This week's book giveaway is in the General Computing forum. We're giving away four copies of Arduino in Action and have Martin Evans, Joshua Noble, and Jordan Hochenbaum on-line! See this thread for details.
Can you be more precise? In general a string is just a sequence of characters. Encrypting that normally produces a sequence of bytes (because encryption works on bytes), but let's suppose you were thinking of some other kind of encryption which produces characters as its output.
Now, given no other requirements, there isn't any way to tell whether some arbitrary sequence of characters is the result of some unknown encryption algorithm given some other arbitrary sequence of characters as its input. So you need more requirements before you can answer that.
Venkat Kommareddy
Greenhorn
Joined: Apr 28, 2011
Posts: 8
posted
0
Thanks for your reply. I understand your point.
I have encrypted password like "n/yBWibTa1Y=". how to I confirm whether it is encrtypted password or not.. is there way to find it using java?
Thanks.
Venkat Kommareddy
Greenhorn
Joined: Apr 28, 2011
Posts: 8
posted
0
continue to my previous reply.
based on confirmation I have to do decrypt for that string in my code.
Venkat Kommareddy wrote:I have encrypted password.... I have to do decrypt for that string in my code
You can't. Passwords are generally encrypted with one-way hashing algorithms, and there isn't a way to get the original password back from the hashed value.
So you're given a password in clear-text and you want to know whether a particular string is the encrypted version of that password? Then just encrypt the clear-text password and see if you get that particular string.
Paul Clapham wrote:So you're given a password in clear-text and you want to know whether a particular string is the encrypted version of that password? Then just encrypt the clear-text password and see if you get that particular string.
This will only work if there is no random component in the encryption. Assuming that a randomly seeded hash has been used then it is normal to place the seed in the clear within the 'encrypted' result so one must extract it first and use it in exactly the same way as it was used in the original hash. But of course until the OK says exactly how the 'encrypted' value was generated one is only guessing.
Retired horse trader.
Note: double-underline links may be advertisements automatically added by this site and are probably not endorsed by me.