--- a/jdk/src/share/classes/com/sun/crypto/provider/PBKDF2KeyImpl.java Mon Aug 15 12:56:01 2011 -0700
+++ b/jdk/src/share/classes/com/sun/crypto/provider/PBKDF2KeyImpl.java Mon Aug 15 11:48:20 2011 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2011, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -133,6 +133,7 @@
byte[] ti = new byte[hlen];
// SecretKeySpec cannot be used, since password can be empty here.
SecretKey macKey = new SecretKey() {
+ private static final long serialVersionUID = 7874493593505141603L;
@Override
public String getAlgorithm() {
return prf.getAlgorithm();
@@ -194,7 +195,7 @@
}
public byte[] getEncoded() {
- return (byte[]) key.clone();
+ return key.clone();
}
public String getAlgorithm() {
@@ -206,7 +207,7 @@
}
public char[] getPassword() {
- return (char[]) passwd.clone();
+ return passwd.clone();
}
public byte[] getSalt() {
@@ -268,7 +269,7 @@
protected void finalize() throws Throwable {
try {
if (this.passwd != null) {
- java.util.Arrays.fill(this.passwd, (char) '0');
+ java.util.Arrays.fill(this.passwd, '0');
this.passwd = null;
}
if (this.key != null) {