Questions tagged [node-crypto]

Node.js crypto module provides cryptographic functionality that includes a set of wrappers for OpenSSL's hash, HMAC, cipher, decipher, sign and verify functions. Use this tag for questions related to Node.js applications/scripts that use crypto module - require('crypto').

should be used on questions related to cryptography api of

The crypto module provides cryptographic functionality that includes a set of wrappers for OpenSSL's hash, HMAC, cipher, decipher, sign and verify functions.

Sample

// Import module.
const crypto = require('crypto');

// Prepare secret.
const secret = 'very secret';

// Create hash.
const hash = crypto.createHmac('sha256', secret)
                   .update('sample information')
                   .digest('hex');

// Print it.
console.log(hash);
// => 5087be71f85fd1ea755742b0fe4eaf5a7c4c25bee5db58f4f7edd1558ed792d0

References

220 questions
-1
votes
1 answer

How to securely encrypt/decrypt

I have a below scenario where I have to encrypt a JSON either as a whole or at least the values in the object before sending it as a response from the API and then I'll have to decrypt the same from the frontend. Below is my response object { …
Amaarockz
  • 4,348
  • 2
  • 9
  • 27
-1
votes
1 answer

I put a password for a zip file to hide the contents in it .i made password like a passage(more than 30 words) . Is it breakable?

I put a password for a zip file to hide the contents in it . i made a password like a passage(more than 30 words) . Is it breakable ?
mahi
  • 11
  • 1
-1
votes
1 answer

How to Validate Json objects in a file from asp.net core application C#

Problem: A nodejs application creates a json file which is a license,and an asp.net core application will need to validate the info with public key. The node application uses RSA sha256 to sign it with private key, and .net core app will use public…
Raj Lone
  • 29
  • 7
-1
votes
1 answer

Encrypt with CakePHP 3.0 and decrypt with NodeJS

I have administration site developed with CakePHP 3.0 framework and i use default Security::encrypt($text, $key, $hmacSalt = null) to encrypt token for API authorization. I also have simple NodeJS service for real time communication and i want to…
trkich
  • 79
  • 1
  • 2
  • 9
-1
votes
1 answer

How does rewrite python crypto code to node.js?

I would like to rewrite following python code to node.js. I'm gonna rewrite small crypto/decrypto library with AES algorithm. I want to decrypto values encrypted by python crypto function. Then i wrote codes in node.js, but it's still something…
toshipon
  • 53
  • 1
  • 5
-2
votes
3 answers

How to decript password using nodejs or javascript

Tried to see my password from my database.My password is test123 So in my database i have saved like this : $2a$10$0V1JkVfl8n.WD/QbInIWqubjcaxnCCnP3K.bhuxjAQbJ9LyFiNTdu. How to see my password again like test123 from…
Pappa S
  • 303
  • 1
  • 8
  • 21
-2
votes
1 answer

NodeJs Encrypting Passwords

var password = crypto.createHash('sha256').update(data.password).digest('base64'); var salt = md5(uniqid() + 'secret'); I want to reverse the hash For example I got: dorZJ+jKH8z29WYXf/+NOiuQYpj3UZDPdr05mj3bN4s= For babylone as a password!
-2
votes
1 answer

Encryption & Encoding(AES, UTF-8 and base64)code conversion from JAVA to node.js giving different results

Update : I finally managed to recreate the whole Java code as required for the third party service. I must add that some of the libraries used are deprecated but I cannot do anything because that is what the other side is using and I must comply.…
Gandalf the White
  • 2,415
  • 2
  • 18
  • 39
-3
votes
1 answer

Query decryption data SQL SERVER

It would like me know if, exists a native tool of the SQL SERVER for encryption some fields, put when making and execute a query, the SQL SERVER decrypt automatically.
-4
votes
1 answer

Attempting to decode function

Having some trouble decoding below, I have been trying to return to the original string. Is there anyone who could assist? def encode(n, i=0, key=5): if i >= len(n): return n chars = list(n) chars[i] = chr(ord(list(n)[i]) + key) …
Cryptic
  • 3
  • 2
1 2 3
14
15