# PBEKey

Sonia Martínez Martínez (sonmar@gbien.rest.tel.uva.es)
Tue, 08 Jun 1999 17:29:30 +0200

- Messages sorted by: [ date ][ thread ][ subject ][ author ]
- Next message: Stephane Houle: "SSL"
- Previous message: Sonia Martínez Martínez: "Security in a LAN"

    Date: Tue, 08 Jun 1999 17:29:30 +0200

    From: Sonia Martínez Martínez <sonmar@gbien.rest.tel.uva.es>

    To: java-security@web2.javasoft.com

    Subject: PBEKey

Hello:

We store the private key that we generate of a password of this
way:

PBEKey pbekey=3Dnew PBEKey("password");
=20
=20
FileOutputStream ostream =3D new FileOutputStream("t1.tmp");
ObjectOutputStream p =3D new ObjectOutputStream(ostream);
=20
p.writeObject(pbekey);
p.flush();
ostream.close();
=20
Cipher pbeCipher =3D Cipher.getInstance("DES/ECB/PKCS5Padding");
pbeCipher.init(Cipher.ENCRYPT_MODE,pbekey);

In the API'S we have read that the SealedObject can be used for
protecting the confidentiality of a Serializable object but we don=B4t
know how to use it. Can you explain us more?

On the other hand we have a problem if the password don't have 8
bytes.
The error is:

Key must be RAW and 8 bytes!

how can we control it?

Thank you for your help.

Best Regast

Sonia Martinez & Susana Cristobal

- Next message: Stephane Houle: "SSL"
- Previous message: Sonia Martínez Martínez: "Security in a LAN"