1 28 package org.jruby.libraries; 29 30 import java.io.IOException ; 31 32 import org.jruby.Ruby; 33 import org.jruby.runtime.load.Library; 34 35 38 public class DigestLibrary implements Library { 39 public void load(final Ruby runtime) throws IOException { 40 org.jruby.RubyDigest.createDigest(runtime); 41 } 42 43 public static class MD5 implements Library { 44 public void load(final Ruby runtime) throws IOException { 45 org.jruby.RubyDigest.createDigestMD5(runtime); 46 } 47 } 48 49 public static class RMD160 implements Library { 50 public void load(final Ruby runtime) throws IOException { 51 org.jruby.RubyDigest.createDigestRMD160(runtime); 52 } 53 } 54 55 public static class SHA1 implements Library { 56 public void load(final Ruby runtime) throws IOException { 57 org.jruby.RubyDigest.createDigestSHA1(runtime); 58 } 59 } 60 61 public static class SHA2 implements Library { 62 public void load(final Ruby runtime) throws IOException { 63 org.jruby.RubyDigest.createDigestSHA2(runtime); 64 } 65 } 66 } | Popular Tags |