Ruby Encrypt/Encode using digest/sha1
To encode strings:
Digest::SHA1.hexdigest "frankmash.blogspot.com"
=> "443072b4f12ca8796d901d5dce40924ef3c414fd"
To encode strings:
Digest::SHA1.hexdigest "frankmash.blogspot.com"
=> "443072b4f12ca8796d901d5dce40924ef3c414fd"
1 Comments:
To clarify, a DIGEST is neither an encryption or an encoding. Rather it's just a unique string based on a calculated mixing-up of the original text. You can't decrypt or decode a digest. Think of it as a FINGERPRINT of the seed text.
Post a Comment
<< Home