mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 07:14:30 +02:00
8258915: Temporary buffer cleanup
Reviewed-by: valeriep
This commit is contained in:
parent
31d8a19e47
commit
f834557ae0
79 changed files with 1517 additions and 1039 deletions
|
@ -34,6 +34,7 @@ import java.security.InvalidKeyException;
|
|||
import java.security.InvalidAlgorithmParameterException;
|
||||
import java.security.NoSuchAlgorithmException;
|
||||
import java.security.NoSuchProviderException;
|
||||
import java.util.Arrays;
|
||||
|
||||
/**
|
||||
* This class enables a programmer to create an object and protect its
|
||||
|
@ -171,10 +172,11 @@ public class SealedObject implements Serializable {
|
|||
*/
|
||||
try {
|
||||
this.encryptedContent = c.doFinal(content);
|
||||
}
|
||||
catch (BadPaddingException ex) {
|
||||
} catch (BadPaddingException ex) {
|
||||
// if sealing is encryption only
|
||||
// Should never happen??
|
||||
} finally {
|
||||
Arrays.fill(content, (byte)0);
|
||||
}
|
||||
|
||||
// Save the parameters
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue