This question already has an answer here:
Is it possible to decrypt(retain the actual string) the password which is saved in db using
Example:If password is
"password" and it is stored in db as
"sha1$4fb4c$2bc693f8a86e2d87f757c382a32e3d50fc945b24",is any chance to retain the same
I am following this tutorial here:
On my mac and am not sure how to accomplish this step to get my sha-1:
I realized I already have a key cause I build and sign my project. Trying to get the SHA-1 is proving difficult with the terminal on my mac:
Mikes-MacBook-Air:beerPortfolio Mike$ keytool -list -v -alias androiddebugkey \ -keystore bp_key.keystore \ -storepass android -keypass androidkeytool error: java.lang.RuntimeException: Usage error, -keystore is not a legal commandjava.lang.RuntimeException: Usage error, -keystore is not a legal command at sun.security.tools.KeyTool.parseArgs(KeyTool.java:375) at sun.security.tools.KeyTool.run(KeyTool.java:171) at sun.security.tools.KeyTool.main(KeyTool.java:166)Mikes-MacBook-Air:beerPortfolio Mike$
Sha1 output is 40 character long so it will be able to uniquely identify 36^40 unique combinations (if we are considering digits (10) and english characters (26),So how it will be able generate unique sha for all and never run out of hashes.
Let's consider a site where users can upload files. Can I use MD5 or SHA1 hashes of their contents as filenames? If not, what should I use? To avoid collisions.
I'm using SHA1 to encrypt some values like password.This is my code:
String passwd = Membership.GeneratePassword(10, 2);SHA1 sha = new SHA1CryptoServiceProvider();byte  password = sha.ComputeHash(passwd);
But VS returns error, because passwd is a string.I have to store the password in a byte array, so is there a way to solve this?