Static
_Static
EXCHANGE_Static
INFOStatic
TYPEStatic
WRITE_The machine-readable name for this keypair.
Decrypt the given message. The encrypted message should be salt + iv + cipher text.
The encrypted content
Optional
publicKey: string | CryptoKeyThe public key used to generate the AES key used on this message. If omitted, decrypt with our own public key.
Optional
aesAlgorithm: stringOptional
info: stringThe decrypted content.
Decrypt and return as string.
Optional
publicKey: string | CryptoKeyOptional
aesAlgorithm: stringOptional
info: stringDelete the keys stored in indexedDB.
Encrypt the given content to the given public key, or encrypt to our public key if it is not passed in.
Content to encrypt
Optional
recipient: string | CryptoKeyTheir public key. Optional b/c we will use our own public key if not passed in.
Optional
info: stringinfo tag for HKDF. Default is the class property.
Optional
aesKey: string | Uint8Array<ArrayBufferLike> | CryptoKeyThis is not relevant for most use cases.
Optional
keysize: SymmKeyLengthDefault is 256
Buffer of salt + iv + cipher text
Encrypt and return as base64 string.
Optional
recipient: string | CryptoKeyOptional
info: stringOptional
aesKey: string | Uint8Array<ArrayBufferLike> | CryptoKeyOptional
keysize: SymmKeyLengthDo DHKE, create a new AES-GCM key.
Optional
publicKey: null | string | CryptoKeyPublic key to use in DHKE. Will use our public key if it is not passed in.
Optional
info: null | stringThe info parameter for DHKE. Will use the class
property INFO
if it is not passed in.
New AES key
Return a 32-character, DNS friendly hash of the public signing key.
Save this keys instance to indexedDB
.
Optional
format: SupportedEncodingsOptional
format: SupportedEncodingsSign the given content and return as base64 string.
Optional
_charsize: CharSizeSerialize this keys instance. Will return an object of
{ DID, publicExchangeKey }, where DID is the public write key,
and publicExchangeKey
is the encryption key, base64
encoded.
Optional
format: SupportedEncodingsStatic
_Static
_Static
createOptional
session: booleanStatic
deviceReturn a 32-character, DNS-friendly hash of the given DID.
A DID format string
32 character, base32 hash of the DID
Static
load
Class for ECC keys