From: Vance Heron Date: 2004-04-16T03:00:45+09:00 Subject: Re: openssl ciphers --=-P3l961nwWZr1Avo90Fwz Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: quoted-printable Thank you for the quick response. This seems better, but I'm still not getting the desired answer. I'm using ruby-1.8.1 on Redhat 7.3 system. Same system used for both Ruby and C versions ... Here are two short example programs - first in C, giving the correct answer The C compilation line is gcc sample1.c -lssl -o sample1 --- sample1.c --- #include void dmp_blk(int l, char *b) { int i; for (i=3D0; i >>>>> "V" =3D=3D Vance Heron writes: >=20 > V> Here's the ruby code segment I'm using... > V> des =3D OpenSSL::Cipher::Cipher.new("DES") > V> des.encrypt( key1 ) > V> res1 =3D des.update( magic ) > V> res1 << des.final=20 >=20 > Well, probably I've not understood but you don't want this ? >=20 > des =3D OpenSSL::Cipher::Cipher.new("DES-ECB") > des.key =3D key1 > des.encrypt(magic) > p des.final >=20 >=20 > Guy Decoux --=-P3l961nwWZr1Avo90Fwz--