當前位置: 首頁>>代碼示例>>Java>>正文


Java BufferedBlockCipher.getUnderlyingCipher方法代碼示例

本文整理匯總了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;
}
 
開發者ID:PhilippC,項目名稱:keepass2android,代碼行數:10,代碼來源:JCEBlockCipher.java

示例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;
}
 
開發者ID:Appdome,項目名稱:ipack,代碼行數:10,代碼來源:BaseBlockCipher.java

示例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);
    }
}
 
開發者ID:thedrummeraki,項目名稱:Aki-SSL,代碼行數:30,代碼來源:IESUtil.java


注:本文中的org.bouncycastle.crypto.BufferedBlockCipher.getUnderlyingCipher方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。