How to decrypt hash get from this function

Mohamed Nizar

we are encrypting our password in the app using this function.How to decrypt them when we need actual string.var crypto = require('crypto');

function encryptPassword(password) {
    var salt = new Buffer('priotzen', 'base64');
    return crypto.pbkdf2Sync(password, salt, 10000, 64).toString('base64');
}

Thanks :)

user1751825

The code you've provided generates a one-way hash. If you use this, then you validate passwords by comparing hashed values. There is no way to decrypt the existing password. If the user forgets their password, then you do a password reset.

If you really want to have retrievable passwords, then you need to look at encryption rather than hashing algorithms. For this type of application, symmetric key encryption, such as AES may be suitable.

Keep in mind that encryption is computationally much more expensive than hashing, and less secure. Hashing is nearly always preferred for passwords. Unless there is some extremely compelling reason to have retrievable passwords, you should steer your client towards one-way hash passwords.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

How to decrypt a password hash?

From Dev

How to get raw binary from hash function in ColdFusion 9?

From Dev

How to use result from a hash function to get an array index?

From Dev

How to decrypt Hash Password in Laravel

From Dev

How to get required hash from a hash array

From Dev

How to get the next hash element from hash?

From Dev

How can I decrypt a password hash in PHP?

From Dev

How to sort a hash by a function depending on values from the hash

From Java

How to remove a key from Hash and get the remaining hash in Ruby/Rails?

From Dev

How to get hash values from array

From Dev

jQuery: How to get hotlink from url / hash?

From Dev

PHP - how to get the image from hash picture?

From Dev

How to get items from a Ruby hash?

From Dev

How to get values from a hash within an array

From Dev

How to get the highest second value from an hash

From Dev

how to get hash value from the URL

From Dev

How to safety store passwords in mysql to decrypt them later in php, not hash?

From Dev

How to Decrypt Password in c# using Salt and Hash.?

From Dev

How to decrypt data which is crypted by CryptProtectData function?

From Dev

AWS KMS How to use Decrypt function Java

From Dev

How to use substitute function to decrypt and encrypt messages

From Dev

How do I translate a hash function from Python to R

From Dev

How to prevent this Cyclic polynomial hash function from using a type constraint?

From Dev

How do I return a hash object from a function in PHP?

From Dev

How can I get hash from string and then string from hash back in javascript

From Dev

How to get [[boundthis]] from function

From Dev

How to get a value from function?

From Dev

how to get a value from function

From Dev

How to get an openssl_decrypt binary output?

Related Related

  1. 1

    How to decrypt a password hash?

  2. 2

    How to get raw binary from hash function in ColdFusion 9?

  3. 3

    How to use result from a hash function to get an array index?

  4. 4

    How to decrypt Hash Password in Laravel

  5. 5

    How to get required hash from a hash array

  6. 6

    How to get the next hash element from hash?

  7. 7

    How can I decrypt a password hash in PHP?

  8. 8

    How to sort a hash by a function depending on values from the hash

  9. 9

    How to remove a key from Hash and get the remaining hash in Ruby/Rails?

  10. 10

    How to get hash values from array

  11. 11

    jQuery: How to get hotlink from url / hash?

  12. 12

    PHP - how to get the image from hash picture?

  13. 13

    How to get items from a Ruby hash?

  14. 14

    How to get values from a hash within an array

  15. 15

    How to get the highest second value from an hash

  16. 16

    how to get hash value from the URL

  17. 17

    How to safety store passwords in mysql to decrypt them later in php, not hash?

  18. 18

    How to Decrypt Password in c# using Salt and Hash.?

  19. 19

    How to decrypt data which is crypted by CryptProtectData function?

  20. 20

    AWS KMS How to use Decrypt function Java

  21. 21

    How to use substitute function to decrypt and encrypt messages

  22. 22

    How do I translate a hash function from Python to R

  23. 23

    How to prevent this Cyclic polynomial hash function from using a type constraint?

  24. 24

    How do I return a hash object from a function in PHP?

  25. 25

    How can I get hash from string and then string from hash back in javascript

  26. 26

    How to get [[boundthis]] from function

  27. 27

    How to get a value from function?

  28. 28

    how to get a value from function

  29. 29

    How to get an openssl_decrypt binary output?

HotTag

Archive