• Post Reply Bookmark Topic Watch Topic
  • New Topic

Knowing more about SHA-1 hash  RSS feed

 
Amandeep Singh
Ranch Hand
Posts: 853
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I know there is a way to encrypt password or text using sha-1 text. but is it possible to decrypt the encrypted text.
if yes, how ? i don't have much idea about the way SHA-1 hashing works.
 
Ulf Dittmer
Rancher
Posts: 42972
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
SHA is a hash (or digest), not a cipher. That means whatever you run through it can't be recovered - it's a one-way street. For reversible encryption, check out the AES cipher.
 
Amandeep Singh
Ranch Hand
Posts: 853
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I wish there could be some crack for SHA-1 algorithm.
 
Ulf Dittmer
Rancher
Posts: 42972
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I wish there could be some crack for SHA-1 algorithm.

 
Amandeep Singh
Ranch Hand
Posts: 853
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i mean to say, it is a one way function only. it can only encrypt. Actually i liked to use the hash value, to create a text or password out of it.
 
Rob Spoor
Sheriff
Posts: 21135
87
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That's impossible. As Ulf said, it's one-way only. The reason is that SHA-1, and all other hashing algorithms, does not generate unique values. It is possible that two different strings get the same SHA-1 encoded value. If you would try to decode that, which of the two strings would it need to return?

If you have an existing SHA-1 encoded string, I fear you're in trouble. If you just want an encrypting / decrypting (two-way) algorithm, use AES or Blowfish.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!