# JCE - buffering, modes and padding!

wplatzer (wplatzer@iaik.tu-graz.ac.at)
Tue, 13 May 1997 09:57:11

- Messages sorted by: [ date ][ thread ][ subject ][ author ]
- Next message: Benjamin de la Porte des Vaux: "Re: not a JVM-level decision"
- Previous message: Marianne Mueller: "Re: Define and use a ClassLoader in an applet"

    Date: Tue, 13 May 1997 09:57:11

    From: wplatzer <wplatzer@iaik.tu-graz.ac.at>

    To: Java Security Questions <java-security@web2.javasoft.com>

    Subject: JCE - buffering, modes and padding!

    Message-Id: <19970513085727.NTM0266@iaik.tu-graz.ac.at>

There is an SPI method called "protected int engineCrypt(byte out[], int =
offset)", which should flush the internal buffer, and process any remaini=
ng data.
But on the API side there is no equivalent method. If I for example call =
one of the three crypt() methods several times how can I "say" to my Ciph=
er to process any remaining data?

It would be fine if the class Cipher could be used something like:

Cipher c =3D Cipher.getInstance("DES");
CipherMode cm =3D new CBC(initializationVector);

c.setMode(cm);
c.setPadding(new PKCS#5());

c.crypt(..);

Wolfgang Platzer

    --
    Dipl.-Ing. Wolfgang Platzer
    Technische Universitaet Graz - University of Technology Graz
    Institut f=FCr Angewandte Informationsverarbeitung
    und Kommunikationstechnologien
    Klosterwiesgasse 32/I, A-8010 Graz,
    Tel: ++43 316 873-5527,Fax: ++43 316 873-5520
    URL <http://www.iaik.tu-graz.ac.at/index.html>

- Next message: Benjamin de la Porte des Vaux: "Re: not a JVM-level decision"
- Previous message: Marianne Mueller: "Re: Define and use a ClassLoader in an applet"