Forum: JRuby Using java's implementation of MessageDigest on JRuby but it

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
D28d6de06f3492ecd56fa6c45aac5dc0?d=identicon&s=25 My Name (vsg)
on 2009-01-27 23:35
So I was just testing out JRuby seeing how well you can call java code
into it, and i wanted to use java's implementation of MessageDigest
instead ruby's. I ran this code.

require 'java'
include_class 'java.security.MessageDigest'

puts MessageDigest.get_instance('MD5').digest('My Text Here')

and it returns this:

no digest with arguments matching [class org.jruby.RubyString]

Looks like I can't use a RubyString as an argument for it to hash? Do I
have to call a String from java? that doesn;t make much sense.
This topic is locked and can not be replied to.