How to find the SHA1 hash of a string in Ruby
Published 2 years, 12 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)
If you have a website, consider joining the Money4Banners advertising network. They will pay you £10 + £5 each month for displaying a small advert on three of your pages, regardless of traffic. American webmasters are welcome, and since £10 == $20, you make more!
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)
- Puzzles (1)
- Ruby (1)
- Tips (10)
- Web Hosting (3)
- Web Hosting Articles (1)
- Web Hosting News (2)
- Windows (6)
- Wordpress (2)
Related Entries
- How to Access a Page in Google's Cache
- How to Find the Current URL with PHP
- How to use the query string in PHP
- Reading a file's contents with PHP
- Generate a Month Calendar In PHP
- Write Text on to an existing PNG image using PHP
- How to Find the Current URL in ASP
- How to use the QueryString in ASP
- Find a visitor's IP Address in ASP
- Use Google to define words
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.