Re: DES encrypting example

Jan Luehe (Jan.Luehe@Eng)
Thu, 9 Jul 1998 10:35:05 -0700 (PDT)

Date: Thu, 9 Jul 1998 10:35:05 -0700 (PDT)
From: Jan Luehe <Jan.Luehe@Eng>
Subject: Re: DES encrypting example
To: java-security@java.Sun.COM, laurentr@insys.fr

Laurent:

> I'm looking for a small example of DES encryption program which uses the
> crypto java API.

The JCE 1.2 API User Guide contains a lot of examples. Unfortunately,
you don't have access to it (because of U.S. export restrictions on
cryptography, which also covers code examples).

> By the way, I would like to know if the key must be generated or if it
> can be chosen, the idea for my program is to let the user type a string
> that would be his encryption key (for DES encryption).

You can generate a random DES key, or specify the key material yourself.
JCE 1.2 also supports password-based encryption according to PKCS #5.

Jan