Java Solaris Communities Sun Store Join SDN My Profile Why Join?
 
Bug Database
Bug Detail
Quick Lists
Top 25 Bugs
Top 25 RFE's
Recently Closed Bugs
Printable Page Printable Page


Bug Database
Bug ID: 4925226
Votes 0
Synopsis Cipher.update(ByteBuffer,ByteBuffer): in and out objects must not be the same
Category jce:classes_crypto
Reported Against tiger
Release Fixed 1.5(tiger-b31)
State 10-Fix Delivered, bug
Priority: 3-Medium
Related Bugs
Submit Date 19-SEP-2003
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  customer  (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()).
Work Around
N/A
Evaluation
Will file CCC.

  xxxxx@xxxxx   2003-09-19
Comments
  
  Include a link with my name & email   


PLEASE NOTE: JDK6 is formerly known as Project Mustang