How to Encrypt and Decrypt with NodeJSby@alexadam
8,478 reads
8,478 reads

How to Encrypt and Decrypt with NodeJS

by Alex Adam2mAugust 21st, 2021
Read on Terminal Reader
Read this story w/o Javascript
tldt arrow

Too Long; Didn't Read

How to encrypt text: create a file named encdec.js and paste: require('crypto')const encrypt = (plainText, password) Then run: encode, decrypt, encode and test: "Hello World," "secret1234" Then run the decryption function: "decrypted" and "encrypted" output: Hello World.js. Then run encode and decrypt: "Decry" and encode text: "Hey World. What do you know? How do we know?"

Company Mentioned

Mention Thumbnail

Coin Mentioned

Mention Thumbnail
featured image - How to Encrypt and Decrypt with NodeJS
Alex Adam HackerNoon profile picture
Alex Adam

Alex Adam

@alexadam

Creative Coder

About @alexadam
LEARN MORE ABOUT @ALEXADAM'S
EXPERTISE AND PLACE ON THE INTERNET.

Share Your Thoughts

About Author

Alex Adam HackerNoon profile picture
Alex Adam@alexadam
Creative Coder

TOPICS

THIS ARTICLE WAS FEATURED IN...

Permanent on Arweave
Read on Terminal Reader
Read this story in a terminal
 Terminal
Read this story w/o Javascript
Read this story w/o Javascript
 Lite
Also published here
L O A D I N G
. . . comments & more!