# Cipher.update() and zero length data

Bernard Leach (leachbj@aba.net.au)
Wed, 14 Oct 1998 15:01:59 +1000

- Messages sorted by: [ date ][ thread ][ subject ][ author ]
- Next message: up@uplinkpro.com: "Is your web site missing Meta Tags?"
- Previous message: Barbara: "Submit your site to 100 classifieds!"
- Next in thread: Jan Luehe: "Re: Cipher.update() and zero length data"

Hello!

At ABA we have been working on a clean room implementation of
the JCE API, and have come across a situation where a cipher
class has been asked to encrypt a zero length array. Specifically
Cipher.update() has been called with a zero length array. The
documentation is a little unclear as to how the Cipher class
will behave here and I'm expecting that it will just pass the
call onto the CipherSpi class to deal with. Unfortunately that
means that each SPI class has to include code to deal with all
the pathalogical cases.

So my question do the various Cipher.update() methods check for
things like in.length == 0 or just pass the arguments along
unchecked?

    --
    Bernard Leach                    Australian Business Access Pty Ltd.
    leachbj@aba.net.au               http://www.aba.net.au/people/leachbj/

- Next message: up@uplinkpro.com: "Is your web site missing Meta Tags?"
- Previous message: Barbara: "Submit your site to 100 classifieds!"
- Next in thread: Jan Luehe: "Re: Cipher.update() and zero length data"