Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

encrypt decrypt javascript

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

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

console.log(encryptedString);
Comment

encrypt decrypt in vanilla javascript

 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);
Comment

PREVIOUS NEXT
Code Example
Javascript :: switch alert 
Javascript :: electron new window 
Javascript :: split array into chunks javascript 
Javascript :: react webpack.config.js example 
Javascript :: how to check password and confirm passwor in joi 
Javascript :: how to get the inner width of a parent div for canvas 
Javascript :: create fooer on print page with jquery 
Javascript :: ISS proxy express 
Javascript :: javascript MIN_VALUE 
Javascript :: app script map fit markers 
Javascript :: discordjs v13 get message content 
Javascript :: how to get variable in local storage in javascript 
Javascript :: create an element jquery 
Javascript :: mongo mongoose join aggregation lookup 
Javascript :: angular automatic typewriter animation 
Javascript :: 2d array filter repetition in javascript 
Javascript :: what is vanilla javascript 
Javascript :: img src to file javascript 
Javascript :: http node 
Javascript :: express redirect with post data 
Javascript :: window.onscroll 
Javascript :: javascript empty array 
Javascript :: format javascript date 
Javascript :: javascript default parameters 
Javascript :: debouncing 
Javascript :: how to convert seconds in hours minutes and seconds js 
Javascript :: Getting Error 404 while running npm install create-react-app 
Javascript :: jquery wait for element to load 
Javascript :: hcaptcha bypass 
Javascript :: foreach modify array javascript 
ADD CONTENT
Topic
Content
Source link
Name
1+6 =