@ -238,7 +238,8 @@ public final class CryptoFunctions {
cipher = Cipher . getInstance ( cipherAlgorithm . jceId ) ;
} else if ( cipherAlgorithm . needsBouncyCastle ) {
registerBouncyCastle ( ) ;
cipher = Cipher . getInstance ( cipherAlgorithm . jceId + "/" + chain . jceId + "/" + padding , "BC" ) ;
// [BouncyCastle]
cipher = Cipher . getInstance ( cipherAlgorithm . jceId + "/" + chain . jceId + "/" + padding , "FR_BC" ) ;
} else {
cipher = Cipher . getInstance ( cipherAlgorithm . jceId + "/" + chain . jceId + "/" + padding ) ;
}
@ -297,7 +298,8 @@ public final class CryptoFunctions {
try {
if ( hashAlgorithm . needsBouncyCastle ) {
registerBouncyCastle ( ) ;
return MessageDigest . getInstance ( hashAlgorithm . jceId , "BC" ) ;
// [BouncyCastle]
return MessageDigest . getInstance ( hashAlgorithm . jceId , "FR_BC" ) ;
} else {
return MessageDigest . getInstance ( hashAlgorithm . jceId ) ;
}
@ -310,7 +312,8 @@ public final class CryptoFunctions {
try {
if ( hashAlgorithm . needsBouncyCastle ) {
registerBouncyCastle ( ) ;
return Mac . getInstance ( hashAlgorithm . jceHmacId , "BC" ) ;
// [BouncyCastle]
return Mac . getInstance ( hashAlgorithm . jceHmacId , "FR_BC" ) ;
} else {
return Mac . getInstance ( hashAlgorithm . jceHmacId ) ;
}
@ -321,10 +324,8 @@ public final class CryptoFunctions {
@SuppressWarnings ( "unchecked" )
public static void registerBouncyCastle ( ) {
if ( Security . getProvider ( "BC" ) ! = null ) {
return ;
}
// [BouncyCastle]
if ( Security . getProvider ( "FR_BC" ) ! = null ) return ;
try {
ClassLoader cl = CryptoFunctions . class . getClassLoader ( ) ;
String bcProviderName = "com.fr.third.v2.org.bouncycastle.jce.provider.BouncyCastleProvider" ;