United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
JDK-4925226 : Cipher.update(ByteBuffer,ByteBuffer): in and out objects must not be the same

Details
Type:
Bug
Submit Date:
2003-09-19
Status:
Resolved
Updated Date:
2004-01-22
Project Name:
JDK
Resolved Date:
2003-12-04
Component:
security-libs
OS:
generic
Sub-Component:
javax.crypto
CPU:
generic
Priority:
P3
Resolution:
Fixed
Affected Versions:
5.0
Fixed Versions:
5.0 (b31)

Related Reports

Sub Tasks

Description
The spec for the new Cipher.update(ByteBuffer,ByteBuffer) and Cipher.doFinal(ByteBuffer,ByteBuffer) does not say what happens if the input and output ByteBuffer are the same object (as opposed two different objects referring to the same piece of memory).

The spec should be updated to state that this is not allowed and a IllegalArgumentException is thrown. If an application wants to do in-place encryption, it should use different ByteBuffer objects referring to that piece of memory (the output buffer could be obtained using byteBuffer.duplicate()).

                                    

Comments
EVALUATION

Will file CCC.

###@###.### 2003-09-19
                                     
2003-09-19
CONVERTED DATA

BugTraq+ Release Management Values

COMMIT TO FIX:
tiger-beta
tiger-beta2

FIXED IN:
tiger-beta
tiger-beta2

INTEGRATED IN:
tiger-b31
tiger-b36
tiger-beta
tiger-beta2


                                     
2004-09-01



Hardware and Software, Engineered to Work Together