How to find the SHA1 hash of a string in Ruby
0 Comments Published by Steven 4 years, 10 months ago in RubyTo find the SHA1 hash of a string, first include the library 'digest/sha1' then use the code below, where 'password' is the string we're computing the hash of.
CODE:
-
require ‘digest/sha1′
-
# ... then later on ...
-
password = "blah"
-
sha1_pass = Digest::SHA1.hexdigest(password)
Search
Categories
- ASP (3)
- ASP Basics (3)
- Blogs (2)
- C# (1)
- Firefox (1)
- Flash (1)
- Google (6)
- Hacks (3)
- Java (1)
- PHP (12)
- Basics (8)
- Files (1)
- Image Handling (3)
- Ruby (1)
- Tips (10)
- Web Hosting (3)
- Web Hosting Articles (1)
- Web Hosting News (2)
- Windows (6)
- Wordpress (2)
Related Entries
- No related posts.
No Responses to “How to find the SHA1 hash of a string in Ruby”
Please Wait
Leave a Reply
You must log in to post a comment.