decrypt()
Othent JS SDK decrypt() function
The decrypt()
function allows applications to decrypt data that has been encrypted using the active user's private key, similarly to the Web Crypto API's decrypt()
.
Limitation: There's currently an 8KB limit in data size when using Othent, but this is currently being worked on. Track the progress on this GitHub issue.
Limitation: Also, the only currently available encryption/decryption algorithm is AES (AES256-GCM
).
This function assumes (and requires) a user is authenticated. See requireAuth()
.
API
ciphertext: BinaryDataType
ciphertext: BinaryDataType
The data to be decrypted with the user's private key, which can be of type ArrayBuffer
, TypedArray
or DataView
.
return Promise<Uint8Array>
return Promise<Uint8Array>
A Promise
containing the decrypted data as Uint8Array
.
Example usage
Last updated