Create new NanoTDF Client
The Ephemeral Key Pair can either be provided or will be generate when fetching the entity object. Once set it cannot be changed. If a new ephemeral key is desired it a new client should be initialized. There is no performance impact for creating a new client IFF the ephemeral key pair is provided.
Optional
kasUrl: stringOptional
ephemeralKeyPair: CryptoKeyPairReadonly
authReadonly
dpopProtected
ephemeralProtected
Optional
ivOptional
kasProtected
kasProtected
requestStatic
Readonly
INITIAL_Static
Readonly
IV_Static
Readonly
KAS_Static
Readonly
KEY_Static
Readonly
SDK_Decrypt ciphertext of the legacy TDF, with the older, smaller i.v. calculation.
Pass a base64 string, TypedArray, or ArrayBuffer ciphertext and get a promise which resolves plaintext
Ciphertext to decrypt
Encrypts the given data using the NanoTDF encryption scheme.
The data to be encrypted.
Optional
options: EncryptOptionsThe encryption options (currently unused).
A promise that resolves to the encrypted data as an ArrayBuffer.
If the initialization vector is not a number.
Explicitly get a new Entity Object using the supplied EntityAttributeService.
This method is expected to be called at least once per encrypt/decrypt cycle. If the entityObject is expired then this will need to be called again.
the ephemeralKeyPair must be set in the constructor if desired to use here. If this is wished to be changed then a new client should be initialized.
key pair is generated when the entity object is fetched IFF the ephemeralKeyPair is not set. This will either be set on the first call or passed in the constructor.
Rewrap key
the full header for the nanotdf
key access server's rewrap endpoint
nanotdf container version
version of the client, as SemVer
the fetchEntityObject
method must be called prior to
Generated using TypeDoc
NanoTDF SDK Client
Example