ascent.crypto

Encryption and Decryption methods for Ascent

Usage

To encrypt or decrypt data, create an AES cipher instance using a specific key available as a certificate in the vault. This ensures that your encryption is secure and tied to your predetermined security protocols. The ascent.crypto.aes() function facilitates the setup of this encrypted communication.

ascent.crypto.aes()

Create an AES cipher instance

ascent.crypto.aes(cipher: string): 
Parameter
Type
Description

cipher

string

The AES Key (These are certificate names available in Vault)

Returns an instance of the AES Cipher

ascent.crypto.aes().encrypt()

ascent.crypto.aes(cipher: string).encrypt(input: any): string
Parameter
Type
Description

input

any

the data to encrypt

Returns the encrypted data

ascent.crypto.aes().decrypt()

ascent.crypto.aes(cipher: string).decrypt(input: string): string
Parameter
Type
Description

input

any

the data to decrypt

Return the decrupted data

Last updated

Was this helpful?