0

How can I generate MD5 hash of a String in JRuby?

String = 'device S6'
2
  • You don't need lots of backticks to surround every possibly programming-related term. Commented Jun 16, 2015 at 14:05
  • possible duplicate of Creating an md5 hash of a number, string, array, or hash in Ruby Commented Jun 16, 2015 at 14:05

1 Answer 1

2

This is a quick jirb session:

>> require 'digest/md5'
=> true
>> md5 = Digest::MD5.new
=> #<Digest::MD5: d41d8cd98f00b204e9800998ecf8427e>
>> md5.hexdigest 'device S6'
=> "0bdf995668120bcb78bfb125995d54e1"

This should get you going...

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.