Robert,
Actually I don't have the exact your version of Rebol but this works in all
versions I have on my harddisk ;)
<WATCH FOR LINE BREAKS>
to-blowfishj-padding: func [
str [string!]
/local ls
][
ls: length? str
if (ls and 7) = 0 [
return str
]
return head insert/dup tail copy str " " ls and (complement 7) + 8 - ls
]
my-port: make port! [
scheme: 'crypt
direction: 'encrypt
key: to-binary
"qachafU&[EMAIL PROTECTED]"
init-vector: to-binary "11111111"
padding: false
]
open my-port
insert my-port to-blowfishj-padding "test test test"
update my-port
value: copy my-port
== #{5B57A12B58F75F6BAAD115497AC6A028}
regards,
Cyphre
----- Original Message -----
From: "robert w dumond" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, September 08, 2005 10:20 PM
Subject: [REBOL] Re: Blowfish
>
> Cyphre -
> First, I would like to say thank you for your help. I tried your
> suggestion below, but I am getting nearly the same response from Rebol
> with:
> == #{7B36C60D60C146E9BE8953C0FE4AD91E}
>
> And in reply to my previous email, if I just close and reopen the
> port, then the response is the same each time, so that is no biggy.
*shrug*
>
> Merci Beaucoup,
> robert w. dumond
>
> Cyphre wrote:
>
> >Robert,
> >
> >I analyzed your Java code and it does a little bit different thing like
you
> >are doing in Rebol. Here is the equivalent:
> >
> >my-port: make port! [
> > scheme: 'crypt
> > direction: 'encrypt
> > key: to-binary
> >"qachafU&[EMAIL PROTECTED]"
> > init-vector: to-binary "11111111"
> > padding: false
> >]
> >open my-port
> >insert my-port join to-binary "test test test" #{2020}
> >update my-port
> >value: copy my-port
> >
> >Which is yielding the same result as Java.
> >You are using some padding algorithm in the case of Java code.
> >
> >Cyphre
> >
> >
> --
> To unsubscribe from the list, just send an email to
> lists at rebol.com with unsubscribe as the subject.
>
--
To unsubscribe from the list, just send an email to
lists at rebol.com with unsubscribe as the subject.