3DES implementation for VisualWorks?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

3DES implementation for VisualWorks?

Joachim Geidel
Hi,

is there a free implementation of the 3DES algorithm available for VisualWorks? I am aware of the DES implementation which is included in the VW distribution, and a 3DES implementation for Squeak, but haven't found 3DES for VisualWorks so far.

Thanks in advance,
Joachim Geidel
Reply | Threaded
Open this post in threaded view
|

Re: 3DES implementation for VisualWorks?

kobetic
The following is an example of tripple DES in CBC mode using block padding which is most likely what you want, but there are possible combinations of modes and paddings in case this doesn't fit your needs.

Security.DES newBP_3EDE_CBC
        setIV: #[1 2 3 4 5 6 7 8] copy; "IV isn't secret, but should be unpredictable, usually randomly generated"
        setKey: (ByteArray withAll: (1 to: 24)); "this is the secret key, must be 24 bytes for 3DES"
        encrypt: 'Message in a Bottle' asByteArray

HTH,

Martin

Joachim Geidel wrote:
> Hi,
>
> is there a free implementation of the 3DES algorithm available for
> VisualWorks? I am aware of the DES implementation which is included in
> the VW distribution, and a 3DES implementation for Squeak, but haven't
> found 3DES for VisualWorks so far.
>
> Thanks in advance,
> Joachim Geidel