From: Brian Candler Date: 2009-10-21T16:43:46+09:00 Subject: Re: Certificate hashes using Base64, DER, ASN.1, PkiPath... Daniel Danopia wrote: > It seems like the hardest part is that it gives a hash. That's the easiest part to implement, although it does hide the structure of what you're hashing :-) data = "hello" require 'digest/sha1' puts [Digest::SHA1.digest(data)].pack("m") > I think I'm > going to add some debug code into the Java and print out a Base64 pre- > hashing to see what is going on. That's a good idea. You can then see if it's really an ASN1 Sequence of one or more certificates. Full specs of ASN1 and DER/BER are in these PDFs: http://www.itu.int/ITU-T/studygroups/com17/languages/X.680-0207.pdf http://www.itu.int/ITU-T/studygroups/com17/languages/X.690-0207.pdf HTH, Brian. -- Posted via http://www.ruby-forum.com/.