Expect the given cipher content to be the format returned by
encryptTo. That is, encrypted AES key +
iv` + encrypted content.
Optional
keysize: SymmKeyLengthDecrypt the given encrypted AES key.
Return the key as Uint8Array
.
Decrypt the given AES key, return the result as a string.
Get the public encryption key as a string.
Sign the message, and return the signature as a Uint8Array
.
Sign a message, return the signature as a base64 encoded string.
Static
_instanceReturn a 32-character, DNS friendly hash of this public signing key.
Save this keys instance to indexedDB
.
Serialize this keys instance. Will return an object of
{ DID, publicEncryptionKey }, where DID is the public signature key,
and publicEncryptKey
is the encryption key, base64
encoded.
Static
createCreate a new Keys
instance.
Static
deviceReturn a 32-character, DNS-friendly hash of the given DID.
a DID format string
32 character, base32 hash of the DID
Static
loadRestore some keys from indexedDB, or create a new keypair if it doesn't exist yet.
Strings to use as keys in indexedDB.
Expose RSA keys only for now, because we are waiting for more browsers to support ECC.
Create an instance with
Keys.create
b/c async.