OpenSSL::HMAC.digest does not accept plain string Digest identifier as other 
rubies
-----------------------------------------------------------------------------------

                 Key: JRUBY-5872
                 URL: http://jira.codehaus.org/browse/JRUBY-5872
             Project: JRuby
          Issue Type: Bug
          Components: OpenSSL
    Affects Versions: JRuby 1.6.2
         Environment: (Java HotSpot(TM) 64-Bit Server VM 1.6.0_24) 
[darwin-x86_64-java]
            Reporter: Lin Jen-Shin
            Priority: Trivial


Also tested with master branch in github 
(fe996d85385cf635b2ecb6d4bfe6c4e698f5a321)

~> jruby -r openssl -e "p OpenSSL::HMAC.digest('sha256', 'key', 'data')"
HMAC.java:74:in `s_digest': java.lang.ClassCastException: org.jruby.RubyString 
cannot be cast to org.jruby.ext.openssl.Digest

~> ruby -vr openssl -e "p OpenSSL::HMAC.digest('sha256', 'key', 'data')"
ruby 1.9.2p180 (2011-02-18 revision 30909) [x86_64-darwin10.7.0]
"P1\xFE=\x98\x9Cm\x157\xA0\x13\xFAns\x9D\xA24c\xFD\xAE\xC3\xB7\x017\xD8(\xE3j\xCE\"\e\xD0"

~> 
/usr/bin/ruby -vr openssl -e "p OpenSSL::HMAC.digest('sha256', 'key', 'data')"
ruby 1.8.7 (2009-06-12 patchlevel 174) [universal-darwin10.0]
"P1\376=\230\234m\0257\240\023\372ns\235\2424c\375\256\303\267\0017\330(\343j\316\"\e\320"

~> rbx -vr openssl -e "p OpenSSL::HMAC.digest('sha256', 'key', 'data')"
rubinius 1.2.4dev (1.8.7 release yyyy-mm-dd JI) [x86_64-apple-darwin10.7.0]
"P1\376=\230\234m\0257\240\023\372ns\235\2424c\375\256\303\267\0017\330(\343j\316\"\e\320"

Thank you for the fix!

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply via email to