src/share/classes/com/sun/crypto/provider/PBKDF2KeyImpl.java

Print this page

        

*** 32,41 **** --- 32,42 ---- import java.util.Arrays; import java.security.KeyRep; import java.security.GeneralSecurityException; import java.security.InvalidKeyException; import java.security.NoSuchAlgorithmException; + import java.security.NoSuchProviderException; import java.security.spec.InvalidKeySpecException; import javax.crypto.Mac; import javax.crypto.SecretKey; import javax.crypto.spec.PBEKeySpec; import javax.crypto.spec.SecretKeySpec;
*** 105,115 **** throw new InvalidKeySpecException("Key length not found"); } else if (keyLength == 0) { throw new InvalidKeySpecException("Key length is negative"); } try { ! this.prf = Mac.getInstance(prfAlgo, new SunJCE()); } catch (NoSuchAlgorithmException nsae) { // not gonna happen; re-throw just in case InvalidKeySpecException ike = new InvalidKeySpecException(); ike.initCause(nsae); throw ike; --- 106,116 ---- throw new InvalidKeySpecException("Key length not found"); } else if (keyLength == 0) { throw new InvalidKeySpecException("Key length is negative"); } try { ! this.prf = Mac.getInstance(prfAlgo); } catch (NoSuchAlgorithmException nsae) { // not gonna happen; re-throw just in case InvalidKeySpecException ike = new InvalidKeySpecException(); ike.initCause(nsae); throw ike;