Stream Cipher
Encrypt/Decrypt with Stream Cipher Security
const { NStreamCipher } = require('nexium-security')
const input = '{"user":{"name":"John","age":30},"message":"Welcome!"}'
const key = 'mySecureKey'
const encrypted = NStreamCipher.encrypt(input, key)
const decrypted = NStreamCipher.decrypt<{ name: string }>(encrypted, key)
const key = 'mysecurekey'
const secret = 'SensitiveData'
const encryptedSecret = NStreamCipher.storeSecret(secret, key)
const decryptedSecret = NStreamCipher.retrieveSecret(encryptedSecret, key)