encrypt decrypt in vanilla javascript

const Cryptr = require('cryptr');
const cryptr = new Cryptr('ReallySecretKey');

const encryptedString = cryptr.encrypt('Popcorn');
const decryptedString = cryptr.decrypt(encryptedString);

console.log(encryptedString);

3.8
10

                                     var encrypted = CryptoJS.AES.encrypt("Message", "Secret Passphrase");
//U2FsdGVkX18ZUVvShFSES21qHsQEqZXMxQ9zgHy+bu0=

var decrypted = CryptoJS.AES.decrypt(encrypted, "Secret Passphrase");
//4d657373616765


document.getElementById("demo1").innerHTML = encrypted;
document.getElementById("demo2").innerHTML = decrypted;
document.getElementById("demo3").innerHTML = decrypted.toString(CryptoJS.enc.Utf8);

3.8 (10 Votes)
0
Are there any code examples left?
Create a Free Account
Unlock the power of data and AI by diving into Python, ChatGPT, SQL, Power BI, and beyond.
Sign up
Develop soft skills on BrainApps
Complete the IQ Test
Relative searches
encryption decryption in javascript Crypt::encrypt() to js decrypt encrypt and decrypt in only javascript with key encrypt and decrypt in javascript with key javascript encryption and decryption with key decrypt and encrypt in jquery online decrypt and encrypt in jquery How to encrypt and decrypt query string parameters in javascript js small sample encrypt decrypt script node js encrypt decrypt string javascript encrypt string with password node encrypt decrypt string crypt and decrypt javascript Nodejs encrypt/decrypt aes encrypt in java and decrypt in javascript how to encrypt and decrypt in javascript node js how to encrypt and decrypt password in node js node js encrypt and decrypt string encrypt and decrypt json in javascript nodejs encrypt and decrypt how to encrypt javascript code js simple encrypt decrypt node js encrypt and decrypt objects encryption and decryption js functions js encrypt and decrypt string node js encrypt decrypt data decrypt js rect js crypto encrypt decrypt example node js crypto encrypt decrypt example how to encrypt and decrypt OBJECT in vanilla javascript how to encrypt and decrypt OBJECT in javascript how to encrypt and decrypt query string in javascript &# codes decrypt js jasypt encrypt decrypt example decrypt js code javascript decrypt encrypt and decrypt library in js javascript decryptor javascript encrypt and decrypt password package encrypt code javascript method encrypt js how to encrypt / decrypt generated key javascript simple encryption and decryption javascript nodejs crypto encrypt decrypt how to encrypt a string javascript javascript decrypter How to encrypt and decrypt Password in NodeJS encrypt a string javascript how to decrypt in js How to encrypt and decrpt text in js javascript encrypt vanilla javascript encrypt encrypt and decrypt using Text Encoder js encrypt and decrypr using TextEncoder js js encrypt string javascript encrypt var decrypt in js node,js encrypt and decrypt string javascript encrype and decrypt javascript encrypt decrypt node js encrypt decrypt javascript encryption and decryption source code encryption and decryption in javascript Encrypt JavaScript code node js decrypt encrytion and decryption using js how to encrypt a js string js decrypt js decrypter nodejs encrypt decrypt jasypt decrypt encrypt and decrypt text in nodejs how to decrypt in node js jasypt encrypt encrypt string js encrypt javascript decrypt javascript encrypt decrypt javascript..... encrypt decrypt javascript.... encrypt decrypt javascript... encrypt decrypt javascript.. encrypt decrypt javascript. encrypt decrypt javascript encrypt decrypt javascript simple encrypt and decrypt file javascript tutorial javascript encrypt decrypt vanilla encrypt script javascript and decrypt encrypt adn decrypt javascript encrypt and decrypt in js encrypt decrypt in vanilla javascript
Made with love
This website uses cookies to make IQCode work for you. By using this site, you agree to our cookie policy

Welcome Back!

Sign up to unlock all of IQCode features:
  • Test your skills and track progress
  • Engage in comprehensive interactive courses
  • Commit to daily skill-enhancing challenges
  • Solve practical, real-world issues
  • Share your insights and learnings
Create an account
Sign in
Recover lost password
Or log in with

Create a Free Account

Sign up to unlock all of IQCode features:
  • Test your skills and track progress
  • Engage in comprehensive interactive courses
  • Commit to daily skill-enhancing challenges
  • Solve practical, real-world issues
  • Share your insights and learnings
Create an account
Sign up
Or sign up with
By signing up, you agree to the Terms and Conditions and Privacy Policy. You also agree to receive product-related marketing emails from IQCode, which you can unsubscribe from at any time.
Creating a new code example
Code snippet title
Source