• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Knowing more about SHA-1 hash

 
Ranch Hand
Posts: 856
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 856
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I wish there could be some crack for SHA-1 algorithm.
 
Ulf Dittmer
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

I wish there could be some crack for SHA-1 algorithm.


 
Amandeep Singh
Ranch Hand
Posts: 856
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Sheriff
Posts: 22784
131
Eclipse IDE Spring VI Editor Chrome Java Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
reply
    Bookmark Topic Watch Topic
  • New Topic