module GcryptoJce module Converter def to_hex(bin) String.from_java_bytes(org.bouncycastle.util.encoders.Hex.encode(bin)) end # end to_hex def from_hex(str) org.bouncycastle.util.encoders.Hex.decode(str) end # end from_hex def to_b64(bin) String.from_java_bytes(java.util.Base64.encoder.encode(bin)) end # end to_b64 def from_b64(str) java.util.Base64.decoder.decode(str) end # end from_b64 end # module Converter # end # module PkernelJce