[#347506] how do you do this — George George <george.githinji@...>

Given an array of strings e.g.

20 messages 2009/10/01

[#347686] what do you enjoy in a ruby quiz? — Martin DeMello <martindemello@...>

I've noticed that the ruby quiz has been getting few responses of

22 messages 2009/10/04

[#347700] Count the number of times an element occurs in an array — Jim Burgess <jack.zelig@...>

Hi,

13 messages 2009/10/05

[#347715] regex simplifier? — Roger Pack <rogerpack2005@...>

Question.

17 messages 2009/10/05

[#347765] Ruby for the wrong reason — flebber <flebber.crue@...>

Hi

39 messages 2009/10/06
[#347774] Re: Ruby for the wrong reason — 7stud -- <bbxx789_05ss@...> 2009/10/06

flebber wrote:

[#347800] Re: Ruby for the wrong reason — James Edward Gray II <james@...> 2009/10/06

On Oct 6, 2009, at 1:16 AM, 7stud -- wrote:

[#347821] Re: Ruby for the wrong reason — 7stud -- <bbxx789_05ss@...> 2009/10/06

James Edward Gray II wrote:

[#347830] How to not display output of a system call. — Jerry Mr <jerry.piazza@...>

Lets say I have a Windows command line program that runs the following:

11 messages 2009/10/06

[#347871] Google Wave- I need contacts! — Tim Mcd <tmcdowell@...>

After 6 days, i finally got my gWave invite! ('and there was much

21 messages 2009/10/07
[#347889] Re: Google Wave- I need contacts! — Andrew Timberlake <andrew@...> 2009/10/07

Well, you could share the love (I'd love an invite) and build contacts

[#347899] Re: Google Wave- I need contacts! — Tim Mcd <tmcdowell@...> 2009/10/07

Andrew Timberlake wrote:

[#347904] Re: Google Wave- I need contacts! — Rajinder Yadav <devguy.ca@...> 2009/10/07

Tim, when they restrict the rules you could ping this group for an

[#347909] Re: Google Wave- I need contacts! — Tim Mcd <tmcdowell@...> 2009/10/07

Rajinder Yadav wrote:

[#349016] Re: Google Wave- I need contacts! — Jarod Reid <jarod@...> 2009/10/28

i'd like an invite if you have a spare

[#350049] Re: Google Wave- I need contacts! — Rajinder Yadav <devguy.ca@...> 2009/11/10

Jarod Reid wrote:

[#350081] Re: Google Wave- I need contacts! — Michael Weller <gibbsnich@...> 2009/11/10

Uhh, didn't hear of google wave before.

[#348042] Windows Ruby Version Check — James Edward Gray II <james@...>

Can a Windows Ruby user please confirm that the "Ruby 1.9.1-p129

11 messages 2009/10/09

[#348100] Class Level inheritable attributes - are we there yet? — dreamcat four <dreamcat4@...>

Hi,

34 messages 2009/10/10
[#348103] Re: Class Level inheritable attributes - are we there yet? — "David A. Black" <dblack@...> 2009/10/10

Hi --

[#348104] Re: Class Level inheritable attributes - are we there yet? — dreamcat four <dreamcat4@...> 2009/10/10

The problem with class variables in Ruby, is that a class variable is

[#348136] Re: Class Level inheritable attributes - are we there yet? — Robert Klemme <shortcutter@...> 2009/10/11

On 10/10/2009 08:59 PM, dreamcat four wrote:

[#348200] Re: Class Level inheritable attributes - are we there yet? — "ara.t.howard" <ara.t.howard@...> 2009/10/12

[#348231] Re: Class Level inheritable attributes - are we there yet? — "David A. Black" <dblack@...> 2009/10/12

On Tue, 13 Oct 2009, ara.t.howard wrote:

[#348248] Re: Class Level inheritable attributes - are we there yet? — "ara.t.howard" <ara.t.howard@...> 2009/10/13

On Mon, Oct 12, 2009 at 17:48, David A. Black <dblack@rubypal.com> wrote:

[#348258] Re: Class Level inheritable attributes - are we there yet? — Robert Klemme <shortcutter@...> 2009/10/13

2009/10/13 ara.t.howard <ara.t.howard@gmail.com>:

[#348169] Does ruby.h overrides C "enum"? — Iñaki Baz Castillo <ibc@...>

Hi, writting a Ruby C extension (for 1.8 or 1.9) I get an error when using

19 messages 2009/10/12

[#348281] how to solve a special JRuby and Java syntax conflict? — "Axel Etzold" <AEtzold@...>

Dear all,

15 messages 2009/10/13
[#348285] Re: how to solve a special JRuby and Java syntax conflict? — Paul Smith <paul@...> 2009/10/13

On Tue, Oct 13, 2009 at 8:52 PM, Axel Etzold <AEtzold@gmx.de> wrote:

[#348286] Re: how to solve a special JRuby and Java syntax conflict? — Paul Smith <paul@...> 2009/10/13

On Tue, Oct 13, 2009 at 9:52 PM, Paul Smith <paul@pollyandpaul.co.uk> wrote:

[#348287] Re: how to solve a special JRuby and Java syntax conflict? — "Axel Etzold" <AEtzold@...> 2009/10/13

Dear Paul,

[#348290] Re: how to solve a special JRuby and Java syntax conflict? — "Walton Hoops" <walton@...> 2009/10/13

Axel Etzold wrote:

[#348325] Re: how to solve a special JRuby and Java syntax conflict? — "Axel Etzold" <AEtzold@...> 2009/10/14

[#348317] deep cloning, how? — Rajinder Yadav <devguy.ca@...>

I am trying to figure out how to perform a deep clone

29 messages 2009/10/14
[#348330] Re: deep cloning, how? — Robert Klemme <shortcutter@...> 2009/10/14

2009/10/14 Rajinder Yadav <devguy.ca@gmail.com>:

[#348366] Re: deep cloning, how? — Caleb Clausen <vikkous@...> 2009/10/14

On 10/14/09, Robert Klemme <shortcutter@googlemail.com> wrote:

[#348379] Re: deep cloning, how? — Robert Klemme <shortcutter@...> 2009/10/14

On 14.10.2009 19:03, Caleb Clausen wrote:

[#348428] Re: deep cloning, how? — Caleb Clausen <vikkous@...> 2009/10/15

On 10/14/09, Robert Klemme <shortcutter@googlemail.com> wrote:

[#348449] Re: deep cloning, how? — Brian Candler <b.candler@...> 2009/10/16

Caleb Clausen wrote:0

[#348339] Hey you! Stop using relative requires! — Intransition <transfire@...>

I recently came across two different programs that had this line in a

22 messages 2009/10/14
[#348365] Re: Hey you! Stop using relative requires! — Tony Arcieri <tony@...> 2009/10/14

On Wed, Oct 14, 2009 at 6:01 AM, Intransition <transfire@gmail.com> wrote:

[#348401] matching against a zillion patterns — George George <george.githinji@...>

i have some script in which i would like to match a string against

18 messages 2009/10/15

[#348486] Dynamic nested each in ruby 1.8.7? — Toi Toi <toi@...>

How can one have a function that uses a dynamic amount of each

15 messages 2009/10/18

[#348570] memory leak — Rob Doug <broken.m@...>

Hi all,

27 messages 2009/10/20
[#348647] Re: memory leak — Robert Klemme <shortcutter@...> 2009/10/20

On 20.10.2009 03:10, Rob Doug wrote:

[#348655] Re: memory leak — Rob Doug <broken.m@...> 2009/10/20

[#348679] Re: memory leak — Robert Klemme <shortcutter@...> 2009/10/21

On 21.10.2009 00:47, Rob Doug wrote:

[#348718] Re: memory leak — Rob Doug <broken.m@...> 2009/10/22

> You could print out object statistics to get an idea about the source of

[#348727] Creating and raising custom exception in Ruby C extension — Iñaki Baz Castillo <ibc@...>

Hi, I'm trying to create a CustomError exception in a Ruby C extension and raise it:

8 messages 2009/10/22

[#348738] convert/replace a value of nil with 0? — Mmcolli00 Mom <mmc_collins@...>

Do you know how I can convert or replace any value that gets back a

12 messages 2009/10/22

[#348825] mail — Mikel Lindsaar <raasdnil@...>

Some of you might know about a little gem that Minero Aoki wrote called tmail.

15 messages 2009/10/25

[#348877] Array#collect in a method call, not working for me — Michael Randall <randallsata@...>

I am sure I'm making a newbie mistake, as I've just started learning

9 messages 2009/10/26

[#349004] duby 0.0.1 Released — Charles Oliver Nutter <headius@...>

duby version 0.0.1 has been released!

18 messages 2009/10/27
[#349007] Re: [ANN] duby 0.0.1 Released — "Bill Kelly" <billk@...> 2009/10/27

[#349022] Closures / lambda question — Aldric Giacomoni <aldric@...>

This is something I don't understand, and did not understand when I

13 messages 2009/10/28

[#349024] Desktop GUI apps in Ruby — Marnen Laibow-Koser <marnen@...>

Hi folks!

35 messages 2009/10/28

[#349099] Ruby can't subtract ? — Aldric Giacomoni <aldric@...>

I found this blog entry:

25 messages 2009/10/28
[#349100] Re: Ruby can't subtract ? — "Matthew K. Williams" <matt@...> 2009/10/28

On Thu, 29 Oct 2009, Aldric Giacomoni wrote:

[#349183] Using multicore CPUs in parallel tasks — Marc Hoeppner <marc.hoeppner@...>

Hi,

19 messages 2009/10/29
[#349203] Re: Using multicore CPUs in parallel tasks — Glen Holcomb <damnbigman@...> 2009/10/29

On Thu, Oct 29, 2009 at 8:56 AM, Marc Hoeppner

[#349221] Re: Using multicore CPUs in parallel tasks — Tony Arcieri <tony@...> 2009/10/29

On Thu, Oct 29, 2009 at 11:48 AM, Glen Holcomb <damnbigman@gmail.com> wrote:

[#349253] Ruby doesn't implement x++ for Fixnum's because ??? — RichardOnRails <RichardDummyMailbox58407@...>

Hi,

159 messages 2009/10/30
[#349303] Re: Ruby doesn't implement x++ for Fixnum's because ??? — RichardOnRails <RichardDummyMailbox58407@...> 2009/10/30

On Oct 29, 9:18瀾m, RichardOnRails

[#349307] Re: Ruby doesn't implement x++ for Fixnum's because ??? — Robert Klemme <shortcutter@...> 2009/10/30

2009/10/30 RichardOnRails <RichardDummyMailbox58407@uscomputergurus.com>:

[#349337] Re: Ruby doesn't implement x++ for Fixnum's because ??? — Rick DeNatale <rick.denatale@...> 2009/10/30

On Fri, Oct 30, 2009 at 11:05 AM, Robert Klemme

[#349600] Re: Ruby doesn't implement x++ for Fixnum's because ??? — Tony Arcieri <tony@...> 2009/11/04

On Fri, Oct 30, 2009 at 12:03 PM, Rick DeNatale <rick.denatale@gmail.com>wrote:

[#349606] Re: Ruby doesn't implement x++ for Fixnum's because ??? — "Michael W. Ryder" <_mwryder55@...> 2009/11/04

Tony Arcieri wrote:

[#349607] Re: Ruby doesn't implement x++ for Fixnum's because ??? — Tony Arcieri <tony@...> 2009/11/04

On Tue, Nov 3, 2009 at 10:30 PM, Michael W. Ryder <_mwryder55@gmail.com>wrote:

[#349611] Re: Ruby doesn't implement x++ for Fixnum's because ??? — Charles Oliver Nutter <headius@...> 2009/11/04

Of course I had to jump in here.

[#349633] Re: Ruby doesn't implement x++ for Fixnum's because ??? — Rick DeNatale <rick.denatale@...> 2009/11/04

On Wed, Nov 4, 2009 at 1:58 AM, Charles Oliver Nutter

[#349635] Re: Ruby doesn't implement x++ for Fixnum's because ??? — Marnen Laibow-Koser <marnen@...> 2009/11/04

Rick Denatale wrote:

[#349621] Re: Ruby doesn't implement x++ for Fixnum's because ??? — Gavin Sinclair <gsinclair@...> 2009/11/04

On Nov 4, 5:58m, Charles Oliver Nutter <head...@headius.com> wrote:

[#349654] Re: Ruby doesn't implement x++ for Fixnum's because ??? — Tony Arcieri <tony@...> 2009/11/04

On Wed, Nov 4, 2009 at 3:55 AM, Gavin Sinclair <gsinclair@gmail.com> wrote:

[#349665] Re: Ruby doesn't implement x++ for Fixnum's because ??? — "Walton Hoops" <walton@...> 2009/11/04

> -----Original Message-----

[#349671] Re: Ruby doesn't implement x++ for Fixnum's because ??? — "Michael W. Ryder" <_mwryder55@...> 2009/11/04

Walton Hoops wrote:

[#349682] Re: Ruby doesn't implement x++ for Fixnum's because ??? — "Walton Hoops" <walton@...> 2009/11/04

> -----Original Message-----

[#349688] Re: Ruby doesn't implement x++ for Fixnum's because ??? — "Michael W. Ryder" <_mwryder55@...> 2009/11/04

Walton Hoops wrote:

[#349689] Re: Ruby doesn't implement x++ for Fixnum's because ??? — Marnen Laibow-Koser <marnen@...> 2009/11/04

Michael W. Ryder wrote:

[#349693] Re: Ruby doesn't implement x++ for Fixnum's because ??? — "Walton Hoops" <walton@...> 2009/11/04

> -----Original Message-----

[#349814] Re: Ruby doesn't implement x++ for Fixnum's because ??? — Seebs <usenet-nospam@...> 2009/11/06

On 2009-11-06, David A. Black <dblack@rubypal.com> wrote:

[#349879] Re: Ruby doesn't implement x++ for Fixnum's because ??? — Tony Arcieri <tony@...> 2009/11/08

On Fri, Nov 6, 2009 at 4:30 PM, Seebs <usenet-nospam@seebs.net> wrote:

[#349880] Re: Ruby doesn't implement x++ for Fixnum's because ??? — Rick DeNatale <rick.denatale@...> 2009/11/08

On Sun, Nov 8, 2009 at 11:48 AM, Tony Arcieri <tony@medioh.com> wrote:

[#349885] Re: Ruby doesn't implement x++ for Fixnum's because ??? — Tony Arcieri <tony@...> 2009/11/08

On Sun, Nov 8, 2009 at 10:45 AM, Rick DeNatale <rick.denatale@gmail.com>wrote:

[#349886] Re: Ruby doesn't implement x++ for Fixnum's because ??? — Marnen Laibow-Koser <marnen@...> 2009/11/08

Tony Arcieri wrote:

[#349887] Re: Ruby doesn't implement x++ for Fixnum's because ??? — Tony Arcieri <tony@...> 2009/11/08

On Sun, Nov 8, 2009 at 11:22 AM, Marnen Laibow-Koser <marnen@marnen.org>wrote:

[#349889] Re: Ruby doesn't implement x++ for Fixnum's because ??? — "Walton Hoops" <walton@...> 2009/11/08

> -----Original Message-----

[#349892] Re: Ruby doesn't implement x++ for Fixnum's because ??? — Tony Arcieri <tony@...> 2009/11/08

On Sun, Nov 8, 2009 at 11:49 AM, Walton Hoops <walton@vyper.hopto.org>wrote:

[#349898] Re: Ruby doesn't implement x++ for Fixnum's because ??? — "Walton Hoops" <walton@...> 2009/11/08

> From: bascule@gmail.com [mailto:bascule@gmail.com] On Behalf Of Tony

[#349900] Re: Ruby doesn't implement x++ for Fixnum's because ??? — Tony Arcieri <tony@...> 2009/11/08

On Sun, Nov 8, 2009 at 1:15 PM, Walton Hoops <walton@vyper.hopto.org> wrote:

[#349980] Re: Ruby doesn't implement x++ for Fixnum's because ??? — Seebs <usenet-nospam@...> 2009/11/09

On 2009-11-09, Marnen Laibow-Koser <marnen@marnen.org> wrote:

[#349988] Re: Ruby doesn't implement x++ for Fixnum's because ??? — Rick DeNatale <rick.denatale@...> 2009/11/09

On Mon, Nov 9, 2009 at 8:40 AM, Seebs <usenet-nospam@seebs.net> wrote:

[#349989] Re: Ruby doesn't implement x++ for Fixnum's because ??? — Marnen Laibow-Koser <marnen@...> 2009/11/09

Rick Denatale wrote:

[#349994] Re: Ruby doesn't implement x++ for Fixnum's because ??? — Aldric Giacomoni <aldric@...> 2009/11/09

Marnen Laibow-Koser wrote:

[#349264] How do you get the tail end of a string? — "Just Another Victim of the Ambient Morality" <ihatespam@...>

I'm actually hoping this is an embarrassing question but how do you get

55 messages 2009/10/30
[#349266] Re: How do you get the tail end of a string? — "Michael W. Ryder" <_mwryder55@...> 2009/10/30

Just Another Victim of the Ambient Morality wrote:

[#349267] Re: How do you get the tail end of a string? — "Michael W. Ryder" <_mwryder55@...> 2009/10/30

Michael W. Ryder wrote:

[#349286] Re: How do you get the tail end of a string? — Bertram Scharpf <lists@...> 2009/10/30

Hi,

[#349323] Merging hashes using both symbols and strings as keys — shenry <stuarthenry@...>

I'm trying to merge to hashes, one using symbols as keys (the defined

15 messages 2009/10/30
[#349528] Re: Merging hashes using both symbols and strings as keys — Josh Cheek <josh.cheek@...> 2009/11/03

On Fri, Oct 30, 2009 at 11:10 AM, shenry <stuarthenry@gmail.com> wrote:

[#349352] In-place parameter modification — Dave Anderson <anderson@...>

Native to ruby are several methods that change passed-in parameters

17 messages 2009/10/30

[#349406] Hamurabi (#223) — Daniel Moore <yahivin@...>

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

23 messages 2009/10/31
[#349451] Re: [QUIZ] Hamurabi (#223) — James Edward Gray II <james@...> 2009/11/01

On Oct 31, 2009, at 6:23 PM, Daniel Moore wrote:

[#349498] Re: [QUIZ] Hamurabi (#223) — Martin DeMello <martindemello@...> 2009/11/02

On Mon, Nov 2, 2009 at 5:29 AM, James Edward Gray II

Re: Certificate hashes using Base64, DER, ASN.1, PkiPath...

From: Daniel Danopia <danopia@...>
Date: 2009-10-21 21:45:09 UTC
List: ruby-talk #348708
I know how to hash, I said it's the hard part because I don't know how
far off I am until I am right :P

Here's the Base64 of my .cert file (I have a .key and .cert):
MIIDqDCCAxGgAwIBAgIJAMIj9IivtNDGMA0GCSqGSIb3DQEBBQUAMIGVMQswCQYDVQQGEwJVUzETMBEGA1UECBMKTmV3IEplcnNleTEUMBIGA1UEBxMLTGFuZGlzdmlsbGUxEDAOBgNVBAoTB0Rhbm9waWExFDASBgNVBAsTC0dvb2dsZSBXYXZlMRQwEgYDVQQDEwtkYW5vcGlhLm5ldDEdMBsGCSqGSIb3DQEJARYObWVAZGFub3BpYS5uZXQwHhcNMDkxMDE3MjE0MjUxWhcNMTAxMDE3MjE0MjUxWjCBlTELMAkGA1UEBhMCVVMxEzARBgNVBAgTCk5ldyBKZXJzZXkxFDASBgNVBAcTC0xhbmRpc3ZpbGxlMRAwDgYDVQQKEwdEYW5vcGlhMRQwEgYDVQQLEwtHb29nbGUgV2F2ZTEUMBIGA1UEAxMLZGFub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it wants:

irb(main):522:0> cert=Base64.decode64(cert)
=> ...
irb(main):525:0> prehash.size
=> 942
irb(main):526:0> cert.size
=> 940
irb(main):527:0> cert2="0\202\003\254#{cert}"
=> ...
irb(main):528:0> i=0;i+=1 while cert2[i]==prehash[i];i
=> 382

irb(main):531:0> c = OpenSSL::X509::Certificate.new(File.read
("danopia.net.cert"))
=> #<OpenSSL::X509::Certificate subject=/C=US/ST=New Jersey/
L=Landisville/O=Danopia/OU=Google Wave/CN=danopia.net/
emailAddress=me@danopia.net, issuer=/C=US/ST=New Jersey/L=Landisville/
O=Danopia/OU=Google Wave/CN=danopia.net/emailAddress=me@danopia.net,
serial=13989293735443484870, not_before=Sat Oct 17 21:42:51 UTC 2009,
not_after=Sun Oct 17 21:42:51 UTC 2010>
irb(main):532:0> seq=OpenSSL::ASN1::Sequence.new([c])
=> #<OpenSSL::ASN1::Sequence:0xb78fe6a4 @tag_class=:UNIVERSAL,
@tagging=nil, @tag=16, @value=
[#<OpenSSL::X509::Certificate ...........................>]>
irb(main):539:0> seq.to_der
=> "0\202\003\2540\202\003\2500\202\003\021\240\003\002\001\002\002\t
\000\302#\364\210\257\264\320\3060\r\006\t*\206H\206\367\r
\............................
irb(main):540:0> prehash
=> "0\202\003\2540\202\003\2500\202\003\021\240\003\002\001\002\002\t
\000\302#\364\210\257\264\320\3060\r\006\t*\206H\206\367\r
\.............................
irb(main):541:0> i=0;i+=1 while seq.to_der[i]==prehash[i];i
=> 382

So it looks like the first part is right, but about a third of the way
through, it suddenly changes.
Here's the "good" version when it starts changing, followed by mine:
(The first two chars are the same.)

=> "\201\2373A\202J\241\222!\275\303@@@A@\000\340c@\f b@\240`@1\347XW
\326~n\2035j\322j\260\037\222Z5\022\"e\rA.\212M\324\370^\333\371
{\260\353\245\260\030\264\275k\236J\301'7@\242\333\177\361\3435\377D\r
\024@\250H\310E\355\377)_\261\327\337\333V\372\334\320EXF\2071\325\303~
\340\332\003\242\275y\320\206\337~\240Y\022x\324\032\307\206U
\356\001\363)\355{\035O\337L\2702@\246Y\216a)\245\261\034's\363\255D
\324\300\352@\200\300@\000h\340\177L ~\214\aA\200\325GC
\201\005\201\0053\264b\227n\307\202\306d
\006\336\231\023\211\265\371\212e\224+\314 r\201\200\325GH\301 p\214 o
\340\0053\264b\227n\307\202\306d\006\336\231\023\211\265\371\212e\224+
\350`f\351 f\f eLB\314\002A\200\325A\001\204\300\225T\314D\314\004A
\200\325A\002\004\302\223\231]\310\022\231\\\234\331^LE\f
\004\201\200\325A\001\304\302\323\030[\231\032\\\335\232[\e\031LD\f
\003\201\200\325A\002\204\301\321\030[\233\334\032XLE\f
\004\201\200\325A\002\304\302\321\333\333\331\333\031H\025\330]\231LE\f
\004\201\200\325A\000\304\302\331\030[\233\334\032XK\233\231]\fGL
\006\301\202J\241\222!\275\303@B@E\203\233YP\031\030
[\233\334\226\022\346\346WH \220\f\"?H\212\373M\fc\000\300`5Q\3210@S
\0000\020\037\363\000\320`\222\250d\210op\320\020\020PP\0008\030\020\b
\016L\313t\005$O\022\276\3144y\003{1\235\2778\373\357\016E_
\252\335\306_\277r\333z_\313F\377\313\260\344\310 \036C\270\245\260Pe
\222$Zc\306;\203\372V\203\3545\217'\r\325\265[\303\302\366oN&b
\317\245\000\266\240\266b\222e\253\242\357\20437\254\eh\t\266bf
\303\032\316\324t\352N838\372:\235\001A\370g\020\b\307f\016b\242E
\326Rr=\315\336\355\226"

=> "\201\2370\r\006\t*\206H\206\367\r
\001\001\001\005\000\003\201\215\0000\201\211\002\201\201\000\307\235a_Y
\371\272\f\325\253I\252\300~Ih\324H\211\2245\004\272)7S\341{o
\345\356\303\256\226\300b\322\365\256y+\004\234\335\002\213m
\377\307\214\327\375\0204Q\002\241#!\027\267\374\245~\307_\177m[\353sA
\025a\032\034\307W\r\373\203h\016\212\365\347B\e}\372\201dI\343Pk
\036\031W\270\a\314\247\265\354u?}2\340\311\002\231f9\204\246\226\304p
\235\317\316\265\023S
\003\251\002\003\001\000\001\243\201\3750\201\3720\035\006\003U
\035\016\004\026\004\024\316\321\212]\273\036\v\031\220\ezdN&
\327\346)\226P\2570\201\312\006\003U\035#
\004\201\3020\201\277\200\024\316\321\212]\273\036\v\031\220\ezdN&
\327\346)\226P\257\241\201\233\244\201\2300\201\2251\v0\t\006\003U
\004\006\023\002US1\0230\021\006\003U\004\b\023\nNew
Jersey1\0240\022\006\003U\004\a\023\vLandisville1\0200\016\006\003U
\004\n\023\aDanopia1\0240\022\006\003U\004\v\023\vGoogle
Wave1\0240\022\006\003U\004\003\023\vdanopia.net1\0350\e\006\t*\206H
\206\367\r\001\t\001\026\016me@danopia.net\202\t\000\302#
\364\210\257\264\320\3060\f\006\003U
\035\023\004\0050\003\001\001\3770\r\006\t*\206H\206\367\r
\001\001\005\005\000\003\201\201\000\200\344\314\267@RD\361+\354\303G
\2207\263\031\333\363\217\276\360\344U\372\255\334e\373\367-
\267\245\374\264o\374\273\016L\202\001\344;\212[\005\006Y\"E\246<c\270?
\245h>\303X\362p\335[U\274</f\364\342f,\372P\vj\vf)&Z\272.\370C3z
\301\266\200\233f&l1\254\355GN
\244\343\2033\217\243\251\320\024\037\206q\000\214v`\346*$]e'#
\334\335\356\331h"

On Oct 21, 3:43m, Brian Candler <b.cand...@pobox.com> wrote:
> 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.pdfhttp://www.itu.int/ITU-T/studygroups/com17/languages/X.690-0207.pdf
>
> HTH,
>
> Brian.
> --
> Posted viahttp://www.ruby-forum.com/.


In This Thread