apiref
@dtinth/encrypted@0.3.1

CipherDecipher.decrypt()  MethodSignature

Decrypts the data.

Signature

decrypt(payload: string): any

Example

encrypted.decrypt("H7WwoocLJnbDgKk1+5vH47JvLp49FQZn.0KlZf2igrh8hzoKG9zGv1t9rmrUZ4PYftuOy3lV96ygthjpFBlQ=")
// => "AKIAYVP4CIPPB7TRITNC"

You can also call the encrypted object directly:

encrypted("H7WwoocLJnbDgKk1+5vH47JvLp49FQZn.0KlZf2igrh8hzoKG9zGv1t9rmrUZ4PYftuOy3lV96ygthjpFBlQ=")
// => "AKIAYVP4CIPPB7TRITNC"

Parameters

ParameterTypeDescription
payloadstring

The encrypted payload

(Returns)any

The decrypted data, which can be any JSON-serializable data