本文整理匯總了Java中org.bouncycastle.crypto.BufferedBlockCipher.getUnderlyingCipher方法的典型用法代碼示例。如果您正苦於以下問題:Java BufferedBlockCipher.getUnderlyingCipher方法的具體用法?Java BufferedBlockCipher.getUnderlyingCipher怎麽用?Java BufferedBlockCipher.getUnderlyingCipher使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類org.bouncycastle.crypto.BufferedBlockCipher
的用法示例。
在下文中一共展示了BufferedBlockCipher.getUnderlyingCipher方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: JCEBlockCipher
import org.bouncycastle.crypto.BufferedBlockCipher; //導入方法依賴的package包/類
protected JCEBlockCipher(
BufferedBlockCipher engine,
int ivLength)
{
baseEngine = engine.getUnderlyingCipher();
this.cipher = new BufferedGenericBlockCipher(engine);
this.ivLength = ivLength / 8;
}
示例2: BaseBlockCipher
import org.bouncycastle.crypto.BufferedBlockCipher; //導入方法依賴的package包/類
protected BaseBlockCipher(
BufferedBlockCipher engine,
int ivLength)
{
baseEngine = engine.getUnderlyingCipher();
this.cipher = new BufferedGenericBlockCipher(engine);
this.ivLength = ivLength / 8;
}
示例3: guessParameterSpec
import org.bouncycastle.crypto.BufferedBlockCipher; //導入方法依賴的package包/類
public static IESParameterSpec guessParameterSpec(BufferedBlockCipher iesBlockCipher)
{
if (iesBlockCipher == null)
{
return new IESParameterSpec(null, null, 128);
}
else
{
BlockCipher underlyingCipher = iesBlockCipher.getUnderlyingCipher();
if (underlyingCipher.getAlgorithmName().equals("DES") ||
underlyingCipher.getAlgorithmName().equals("RC2") ||
underlyingCipher.getAlgorithmName().equals("RC5-32") ||
underlyingCipher.getAlgorithmName().equals("RC5-64"))
{
return new IESParameterSpec(null, null, 64, 64);
}
else if (underlyingCipher.getAlgorithmName().equals("SKIPJACK"))
{
return new IESParameterSpec(null, null, 80, 80);
}
else if (underlyingCipher.getAlgorithmName().equals("GOST28147"))
{
return new IESParameterSpec(null, null, 256, 256);
}
return new IESParameterSpec(null, null, 128, 128);
}
}