Skip to content

Instantly share code, notes, and snippets.

@AvocadoVenom
Last active February 10, 2023 15:50
Show Gist options
  • Save AvocadoVenom/9b1dcb90fcdadca5d86465f55f410c28 to your computer and use it in GitHub Desktop.
Save AvocadoVenom/9b1dcb90fcdadca5d86465f55f410c28 to your computer and use it in GitHub Desktop.
import TextManipulationHelper from './text-manipulation';
import CryptographyService from './cryptography.service';
const base64 = 'string-in-base64';
const { cipher, key, iv } = await CryptographyService.encrypt(base64);
const cipherText = TextManipulationHelper.convertStreamToBase64(cipher);
console.log('Cipher: ', cipherText);
console.log('Encryption key: ', key);
console.log('IV: ', iv);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment