@fillipe143/secure-crypto
v1.0.1
Published
Encrypt and decrypt your data in a secure way
Downloads
4
Maintainers
Readme
const SecureCrypto = require('@fillipe143/secure-crypto');
const SecureCrypto = require('@fillipe143/secure-crypto');
async function example() {
const text = 'Exemplo de texto que será criptografado';
const key = 'Chave que será usada para criptografar o texto';
//Criptografar o conteúdo
const encrypted = await SecureCrypto.encrypt(text, key);
console.log('Conteúdo criptografado: ' + encrypted);
//Descriptografar o conteúdo
const decrypted = await SecureCrypto.decrypt(encrypted, key);
console.log('Conteúdo descriptografado: ' + decrypted);
}
example();