当前位置: 首页>>代码示例>>Java>>正文


Java KDF2BytesGenerator类代码示例

本文整理汇总了Java中org.bouncycastle.crypto.generators.KDF2BytesGenerator的典型用法代码示例。如果您正苦于以下问题:Java KDF2BytesGenerator类的具体用法?Java KDF2BytesGenerator怎么用?Java KDF2BytesGenerator使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


KDF2BytesGenerator类属于org.bouncycastle.crypto.generators包,在下文中一共展示了KDF2BytesGenerator类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: performTest

import org.bouncycastle.crypto.generators.KDF2BytesGenerator; //导入依赖的package包/类
public void performTest()
{
    checkMask(1, new KDF2BytesGenerator(new ShortenedDigest(new SHA256Digest(), 20)), seed1, mask1);
    checkMask(2, new KDF2BytesGenerator(new ShortenedDigest(new SHA256Digest(), 20)), seed2, mask2);
    checkMask(3, new KDF2BytesGenerator(new SHA256Digest()), seed2, adjustedMask2);
    checkMask(4, new KDF2BytesGenerator(new SHA1Digest()), seed2, sha1Mask);
    checkMask(5, new KDF2BytesGenerator(new SHA1Digest()), seed3, mask3);
    checkMask(6, new KDF2BytesGenerator(new SHA1Digest()), seed4, mask4);
    
    try
    {
        new KDF2BytesGenerator(new SHA1Digest()).generateBytes(new byte[10], 0, 20);
        
        fail("short input array not caught");
    }
    catch (DataLengthException e)
    {
        // expected 
    }
}
 
开发者ID:ttt43ttt,项目名称:gwt-crypto,代码行数:21,代码来源:KDF2GeneratorTest.java

示例2: IESwithDESede

import org.bouncycastle.crypto.generators.KDF2BytesGenerator; //导入依赖的package包/类
public IESwithDESede()
{
    super(new IESEngine(new DHBasicAgreement(),
        new KDF2BytesGenerator(new SHA1Digest()),
        new HMac(new SHA1Digest()),
        new PaddedBufferedBlockCipher(new DESedeEngine())));
}
 
开发者ID:Appdome,项目名称:ipack,代码行数:8,代码来源:IESCipher.java

示例3: IESwithAES

import org.bouncycastle.crypto.generators.KDF2BytesGenerator; //导入依赖的package包/类
public IESwithAES()
{
    super(new IESEngine(new DHBasicAgreement(),
        new KDF2BytesGenerator(new SHA1Digest()),
        new HMac(new SHA1Digest()),
        new PaddedBufferedBlockCipher(new AESEngine())));
}
 
开发者ID:Appdome,项目名称:ipack,代码行数:8,代码来源:IESCipher.java

示例4: ECIESwithDESede

import org.bouncycastle.crypto.generators.KDF2BytesGenerator; //导入依赖的package包/类
public ECIESwithDESede()
{
    super(new IESEngine(new ECDHBasicAgreement(),
        new KDF2BytesGenerator(new SHA1Digest()),
        new HMac(new SHA1Digest()),
        new PaddedBufferedBlockCipher(new DESedeEngine())));
}
 
开发者ID:Appdome,项目名称:ipack,代码行数:8,代码来源:IESCipher.java

示例5: ECIESwithAES

import org.bouncycastle.crypto.generators.KDF2BytesGenerator; //导入依赖的package包/类
public ECIESwithAES()
{
    super(new IESEngine(new ECDHBasicAgreement(),
        new KDF2BytesGenerator(new SHA1Digest()),
        new HMac(new SHA1Digest()),
        new PaddedBufferedBlockCipher(new AESEngine())));
}
 
开发者ID:Appdome,项目名称:ipack,代码行数:8,代码来源:IESCipher.java

示例6: IES

import org.bouncycastle.crypto.generators.KDF2BytesGenerator; //导入依赖的package包/类
public IES()
{
    super(new IESEngine(
           new DHBasicAgreement(),
           new KDF2BytesGenerator(new SHA1Digest()),
           new HMac(new SHA1Digest())));
}
 
开发者ID:Appdome,项目名称:ipack,代码行数:8,代码来源:CipherSpi.java

示例7: ECIES

import org.bouncycastle.crypto.generators.KDF2BytesGenerator; //导入依赖的package包/类
public ECIES()
{
    super(new IESEngine(
           new ECDHBasicAgreement(),
           new KDF2BytesGenerator(new SHA1Digest()),
           new HMac(new SHA1Digest())));
}
 
开发者ID:thangbn,项目名称:Direct-File-Downloader,代码行数:8,代码来源:JCEIESCipher.java

示例8: OldIESwithCipher

import org.bouncycastle.crypto.generators.KDF2BytesGenerator; //导入依赖的package包/类
public OldIESwithCipher(BlockCipher baseCipher)
{
    super(new OldIESEngine(new DHBasicAgreement(),
        new KDF2BytesGenerator(new SHA1Digest()),
        new HMac(new SHA1Digest()),
        new PaddedBufferedBlockCipher(baseCipher)));
}
 
开发者ID:thedrummeraki,项目名称:Aki-SSL,代码行数:8,代码来源:IESCipher.java

示例9: ECIESwithCipher

import org.bouncycastle.crypto.generators.KDF2BytesGenerator; //导入依赖的package包/类
public ECIESwithCipher(BlockCipher cipher)
{
    super(new IESEngine(new ECDHBasicAgreement(),
                    new KDF2BytesGenerator(new SHA1Digest()),
                    new HMac(new SHA1Digest()),
                    new PaddedBufferedBlockCipher(cipher)));
}
 
开发者ID:thedrummeraki,项目名称:Aki-SSL,代码行数:8,代码来源:IESCipher.java

示例10: OldECIESwithCipher

import org.bouncycastle.crypto.generators.KDF2BytesGenerator; //导入依赖的package包/类
public OldECIESwithCipher(BlockCipher baseCipher)
{
    super(new OldIESEngine(new ECDHBasicAgreement(),
        new KDF2BytesGenerator(new SHA1Digest()),
        new HMac(new SHA1Digest()),
        new PaddedBufferedBlockCipher(baseCipher)));
}
 
开发者ID:thedrummeraki,项目名称:Aki-SSL,代码行数:8,代码来源:IESCipher.java

示例11: ECDHKEKGenerator

import org.bouncycastle.crypto.generators.KDF2BytesGenerator; //导入依赖的package包/类
public ECDHKEKGenerator(
    Digest digest)
{
    this.kdf = new KDF2BytesGenerator(digest);
}
 
开发者ID:Appdome,项目名称:ipack,代码行数:6,代码来源:ECDHKEKGenerator.java

示例12: IES

import org.bouncycastle.crypto.generators.KDF2BytesGenerator; //导入依赖的package包/类
public IES()
{
    super(new IESEngine(new DHBasicAgreement(),
        new KDF2BytesGenerator(new SHA1Digest()),
        new HMac(new SHA1Digest())));
}
 
开发者ID:Appdome,项目名称:ipack,代码行数:7,代码来源:IESCipher.java

示例13: ECIES

import org.bouncycastle.crypto.generators.KDF2BytesGenerator; //导入依赖的package包/类
public ECIES()
{
    super(new IESEngine(new ECDHBasicAgreement(),
        new KDF2BytesGenerator(new SHA1Digest()),
        new HMac(new SHA1Digest())));
}
 
开发者ID:Appdome,项目名称:ipack,代码行数:7,代码来源:IESCipher.java

示例14: OldIES

import org.bouncycastle.crypto.generators.KDF2BytesGenerator; //导入依赖的package包/类
public OldIES()
{
    super(new OldIESEngine(new DHBasicAgreement(),
        new KDF2BytesGenerator(new SHA1Digest()),
        new HMac(new SHA1Digest())));
}
 
开发者ID:thedrummeraki,项目名称:Aki-SSL,代码行数:7,代码来源:IESCipher.java

示例15: DHwithSHA1KDF

import org.bouncycastle.crypto.generators.KDF2BytesGenerator; //导入依赖的package包/类
public DHwithSHA1KDF()
{
    super("ECDHwithSHA1KDF", new ECDHBasicAgreement(), new KDF2BytesGenerator(new SHA1Digest()));
}
 
开发者ID:thedrummeraki,项目名称:Aki-SSL,代码行数:5,代码来源:KeyAgreementSpi.java


注:本文中的org.bouncycastle.crypto.generators.KDF2BytesGenerator类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。