本文整理汇总了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
}
}
示例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())));
}
示例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())));
}
示例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())));
}
示例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())));
}
示例6: IES
import org.bouncycastle.crypto.generators.KDF2BytesGenerator; //导入依赖的package包/类
public IES()
{
super(new IESEngine(
new DHBasicAgreement(),
new KDF2BytesGenerator(new SHA1Digest()),
new HMac(new SHA1Digest())));
}
示例7: ECIES
import org.bouncycastle.crypto.generators.KDF2BytesGenerator; //导入依赖的package包/类
public ECIES()
{
super(new IESEngine(
new ECDHBasicAgreement(),
new KDF2BytesGenerator(new SHA1Digest()),
new HMac(new SHA1Digest())));
}
示例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)));
}
示例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)));
}
示例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)));
}
示例11: ECDHKEKGenerator
import org.bouncycastle.crypto.generators.KDF2BytesGenerator; //导入依赖的package包/类
public ECDHKEKGenerator(
Digest digest)
{
this.kdf = new KDF2BytesGenerator(digest);
}
示例12: IES
import org.bouncycastle.crypto.generators.KDF2BytesGenerator; //导入依赖的package包/类
public IES()
{
super(new IESEngine(new DHBasicAgreement(),
new KDF2BytesGenerator(new SHA1Digest()),
new HMac(new SHA1Digest())));
}
示例13: ECIES
import org.bouncycastle.crypto.generators.KDF2BytesGenerator; //导入依赖的package包/类
public ECIES()
{
super(new IESEngine(new ECDHBasicAgreement(),
new KDF2BytesGenerator(new SHA1Digest()),
new HMac(new SHA1Digest())));
}
示例14: OldIES
import org.bouncycastle.crypto.generators.KDF2BytesGenerator; //导入依赖的package包/类
public OldIES()
{
super(new OldIESEngine(new DHBasicAgreement(),
new KDF2BytesGenerator(new SHA1Digest()),
new HMac(new SHA1Digest())));
}
示例15: DHwithSHA1KDF
import org.bouncycastle.crypto.generators.KDF2BytesGenerator; //导入依赖的package包/类
public DHwithSHA1KDF()
{
super("ECDHwithSHA1KDF", new ECDHBasicAgreement(), new KDF2BytesGenerator(new SHA1Digest()));
}