aboutsummaryrefslogtreecommitdiff
path: root/cc/registry.h
diff options
context:
space:
mode:
authorprzydatek <przydatek@google.com>2019-02-25 06:13:34 -0800
committerTink Team <noreply@google.com>2019-03-05 12:23:16 -0800
commit58da2190cae48cba2708a88546bd86429110cae4 (patch)
tree1d24d2864d278cac797764fe41b7cc6367d84b31 /cc/registry.h
parent40f007314fb5571b75776769a326b2a7a5cf1ef3 (diff)
downloadtink-58da2190cae48cba2708a88546bd86429110cae4.tar.gz
Updating documentation of Registry (C++, Java)
PiperOrigin-RevId: 235517508 GitOrigin-RevId: d8c88fc5b3102c699ecab77fc431d854293cc032
Diffstat (limited to 'cc/registry.h')
-rw-r--r--cc/registry.h30
1 files changed, 16 insertions, 14 deletions
diff --git a/cc/registry.h b/cc/registry.h
index 5bc6df7ae..288f75ecf 100644
--- a/cc/registry.h
+++ b/cc/registry.h
@@ -27,23 +27,25 @@
namespace crypto {
namespace tink {
-// Registry for KeyMangers.
+// Registry for KeyMangers and PrimitiveWrappers.
//
-// It is essentially a big container (map) that for each supported key
-// type holds a corresponding KeyManager object, which "understands"
-// the key type (i.e. the KeyManager can instantiate the primitive
-// corresponding to given key, or can generate new keys of the
-// supported key type). Registry is initialized at startup, and is
-// later used to instantiate primitives for given keys or keysets.
-// Keeping KeyManagers for all primitives in a single Registry (rather
-// than having a separate KeyManager per primitive) enables modular
-// construction of compound primitives from "simple" ones, e.g.,
+// It is essentially a big container (map) that for each supported key type
+// holds a corresponding KeyManager object, which "understands" the key type
+// (i.e. the KeyManager can instantiate the primitive corresponding to given
+// key, or can generate new keys of the supported key type). It holds also
+// a so-called PrimitiveWrapper for each supported primitive, so that it can
+// wrap a set of primitives (corresponding to a keyset) into a single primitive.
+//
+// Registry is initialized at startup, and is later used to instantiate
+// primitives for given keys or keysets. Keeping KeyManagers for all primitives
+// in a single Registry (rather than having a separate KeyManager per primitive)
+// enables modular construction of compound primitives from "simple" ones, e.g.,
// AES-CTR-HMAC AEAD encryption uses IND-CPA encryption and a MAC.
//
-// Note that regular users will usually not work directly with
-// Registry, but rather via primitive factories, which in the
-// background query the Registry for specific KeyManagers. Registry
-// is public though, to enable configurations with custom primitives
+// Note that regular users will usually not work directly with Registry, but
+// rather via KeysetHandle::GetPrimitive()-methods, which in the background
+// query the Registry for specific KeyManagers and PrimitiveWrappers.
+// Registry is public though, to enable configurations with custom primitives
// and KeyManagers.
class Registry {
public: