diff options
Diffstat (limited to 'src/main/java/org/bouncycastle/jcajce/provider/symmetric/util/BCPBEKey.java')
-rw-r--r-- | src/main/java/org/bouncycastle/jcajce/provider/symmetric/util/BCPBEKey.java | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/main/java/org/bouncycastle/jcajce/provider/symmetric/util/BCPBEKey.java b/src/main/java/org/bouncycastle/jcajce/provider/symmetric/util/BCPBEKey.java index 9c4c8316..93aa78e9 100644 --- a/src/main/java/org/bouncycastle/jcajce/provider/symmetric/util/BCPBEKey.java +++ b/src/main/java/org/bouncycastle/jcajce/provider/symmetric/util/BCPBEKey.java @@ -78,6 +78,10 @@ public class BCPBEKey { return PBEParametersGenerator.PKCS12PasswordToBytes(pbeKeySpec.getPassword()); } + else if (type == PBE.PBKDF2) + { + return PBEParametersGenerator.PKCS5PasswordToUTF8Bytes(pbeKeySpec.getPassword()); + } else { return PBEParametersGenerator.PKCS5PasswordToBytes(pbeKeySpec.getPassword()); |