harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Anton Ivanov (JIRA)" <j...@apache.org>
Subject [jira] Created: (HARMONY-2524) javax.crypto.CipherSpi.engineUpdate(ByteBuffer in, ByteBuffer out) method throws NullPointerException on correct input
Date Thu, 07 Dec 2006 14:57:21 GMT
javax.crypto.CipherSpi.engineUpdate(ByteBuffer in, ByteBuffer out) method throws NullPointerException
on correct input
----------------------------------------------------------------------------------------------------------------------

                 Key: HARMONY-2524
                 URL: http://issues.apache.org/jira/browse/HARMONY-2524
             Project: Harmony
          Issue Type: Bug
          Components: Classlib
            Reporter: Anton Ivanov


The problem is as follows:
An underlying cipher can be a blocked cipher. So an input data may be too short to result
in a block after encryption/decryption done
(method javax.crypto.CipherSpi.engineUpdate(byte[] in, int  offset, int length) will return
null in such a case).
If we call javax.crypto.CipherSpi.engineUpdate(ByteBuffer in, ByteBuffer out) method where
in parameter is such a short block we will
obtain a NullPointerException. While according to the specification we have to only return
0 (total number of bytes stored in output)
and have not to throw NullPointerException.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message