91-9990449935 0120-4256464 |
Node.js CryptoThe Node.js Crypto module supports cryptography. It provides cryptographic functionality that includes a set of wrappers for open SSL's hash HMAC, cipher, decipher, sign and verify functions. What is HashA hash is a fixed-length string of bits i.e. procedurally and deterministically generated from some arbitrary block of source data. What is HMACHMAC stands for Hash-based Message Authentication Code. It is a process for applying a hash algorithm to both data and a secret key that results in a single final hash. Encryption Example using Hash and HMACFile: crypto_example1.js Open Node.js command prompt and run the following code: Encryption example using CipherFile: crypto_example2.js Open Node.js command prompt and run the following code: Decryption example using DecipherFile: crypto_example3.js Open Node.js command prompt and run the following code:
Next TopicNode.js TLS/SSL
|