Skip to content

Instantly share code, notes, and snippets.

@headius
Created January 11, 2011 08:04
Show Gist options
  • Save headius/774183 to your computer and use it in GitHub Desktop.
Save headius/774183 to your computer and use it in GitHub Desktop.
~/projects/jruby ➔ gem install bouncycastle:bcprov-jdk15
Successfully installed bouncycastle.bcprov-jdk15-140.0.0-java
1 gem installed
~/projects/jruby ➔ jirb
>> require 'maven/bouncycastle/bcprov-jdk15'
=> true
>> require 'java'
=> true
>> java.security.Security.add_provider(org.bouncycastle.jce.provider.BouncyCastleProvider.new)
=> 11
>> p java.security.MessageDigest.get_instance("1.3.14.3.2.26", "BC").algorithm
"SHA-1"
=> "SHA-1"
>>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment