Java 类org.bouncycastle.crypto.generators.KDF2BytesGenerator 实例源码

项目:gwt-crypto    文件:KDF2GeneratorTest.java   
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 
    }
}
项目:irma_future_id    文件:KDF2GeneratorTest.java   
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 
    }
}
项目:bc-java    文件:KDF2GeneratorTest.java   
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 
    }
}
项目:ipack    文件:IESCipher.java   
public IESwithDESede()
{
    super(new IESEngine(new DHBasicAgreement(),
        new KDF2BytesGenerator(new SHA1Digest()),
        new HMac(new SHA1Digest()),
        new PaddedBufferedBlockCipher(new DESedeEngine())));
}
项目:ipack    文件:IESCipher.java   
public IESwithAES()
{
    super(new IESEngine(new DHBasicAgreement(),
        new KDF2BytesGenerator(new SHA1Digest()),
        new HMac(new SHA1Digest()),
        new PaddedBufferedBlockCipher(new AESEngine())));
}
项目:ipack    文件:IESCipher.java   
public ECIESwithDESede()
{
    super(new IESEngine(new ECDHBasicAgreement(),
        new KDF2BytesGenerator(new SHA1Digest()),
        new HMac(new SHA1Digest()),
        new PaddedBufferedBlockCipher(new DESedeEngine())));
}
项目:ipack    文件:IESCipher.java   
public ECIESwithAES()
{
    super(new IESEngine(new ECDHBasicAgreement(),
        new KDF2BytesGenerator(new SHA1Digest()),
        new HMac(new SHA1Digest()),
        new PaddedBufferedBlockCipher(new AESEngine())));
}
项目:ipack    文件:CipherSpi.java   
public IES()
{
    super(new IESEngine(
           new DHBasicAgreement(),
           new KDF2BytesGenerator(new SHA1Digest()),
           new HMac(new SHA1Digest())));
}
项目:Direct-File-Downloader    文件:JCEIESCipher.java   
public ECIES()
{
    super(new IESEngine(
           new ECDHBasicAgreement(),
           new KDF2BytesGenerator(new SHA1Digest()),
           new HMac(new SHA1Digest())));
}
项目:Aki-SSL    文件:IESCipher.java   
public IESwithDESede()
{
    super(new IESEngine(new DHBasicAgreement(),
        new KDF2BytesGenerator(new SHA1Digest()),
        new HMac(new SHA1Digest()),
        new PaddedBufferedBlockCipher(new DESedeEngine())));
}
项目:Aki-SSL    文件:IESCipher.java   
public IESwithAES()
{
    super(new IESEngine(new DHBasicAgreement(),
        new KDF2BytesGenerator(new SHA1Digest()),
        new HMac(new SHA1Digest()),
        new PaddedBufferedBlockCipher(new AESEngine())));
}
项目:Aki-SSL    文件:IESCipher.java   
public OldIESwithCipher(BlockCipher baseCipher)
{
    super(new OldIESEngine(new DHBasicAgreement(),
        new KDF2BytesGenerator(new SHA1Digest()),
        new HMac(new SHA1Digest()),
        new PaddedBufferedBlockCipher(baseCipher)));
}
项目:Aki-SSL    文件:IESCipher.java   
public ECIESwithCipher(BlockCipher cipher)
{
    super(new IESEngine(new ECDHBasicAgreement(),
                    new KDF2BytesGenerator(new SHA1Digest()),
                    new HMac(new SHA1Digest()),
                    new PaddedBufferedBlockCipher(cipher)));
}
项目:Aki-SSL    文件:IESCipher.java   
public ECIESwithCipher(BlockCipher cipher, int ivLength)
{
    super(new IESEngine(new ECDHBasicAgreement(),
                    new KDF2BytesGenerator(new SHA1Digest()),
                    new HMac(new SHA1Digest()),
                    new PaddedBufferedBlockCipher(cipher)), ivLength);
}
项目:Aki-SSL    文件:IESCipher.java   
public OldECIESwithCipher(BlockCipher baseCipher)
{
    super(new OldIESEngine(new ECDHBasicAgreement(),
        new KDF2BytesGenerator(new SHA1Digest()),
        new HMac(new SHA1Digest()),
        new PaddedBufferedBlockCipher(baseCipher)));
}
项目:Aki-SSL    文件:IESCipher.java   
public OldECIESwithCipher(BlockCipher baseCipher, int ivLength)
{
    super(new OldIESEngine(new ECDHBasicAgreement(),
        new KDF2BytesGenerator(new SHA1Digest()),
        new HMac(new SHA1Digest()),
        new PaddedBufferedBlockCipher(baseCipher)), ivLength);
}
项目:AcademicTorrents-Downloader    文件:JCEIESCipher.java   
public ECIES()
{
    super(new IESEngine(
           new ECDHBasicAgreement(),
           new KDF2BytesGenerator(new SHA1Digest()),
           new HMac(new SHA1Digest())));
}
项目:CryptMeme    文件:IESCipher.java   
public IESwithDESede()
{
    super(new IESEngine(new DHBasicAgreement(),
        new KDF2BytesGenerator(new SHA1Digest()),
        new HMac(new SHA1Digest()),
        new PaddedBufferedBlockCipher(new DESedeEngine())));
}
项目:CryptMeme    文件:IESCipher.java   
public IESwithAES()
{
    super(new IESEngine(new DHBasicAgreement(),
        new KDF2BytesGenerator(new SHA1Digest()),
        new HMac(new SHA1Digest()),
        new PaddedBufferedBlockCipher(new AESEngine())));
}
项目:CryptMeme    文件:IESCipher.java   
public ECIESwithDESede()
{
    super(new IESEngine(new ECDHBasicAgreement(),
        new KDF2BytesGenerator(new SHA1Digest()),
        new HMac(new SHA1Digest()),
        new PaddedBufferedBlockCipher(new DESedeEngine())));
}
项目:CryptMeme    文件:IESCipher.java   
public ECIESwithAES()
{
    super(new IESEngine(new ECDHBasicAgreement(),
        new KDF2BytesGenerator(new SHA1Digest()),
        new HMac(new SHA1Digest()),
        new PaddedBufferedBlockCipher(new AESEngine())));
}
项目:CryptMeme    文件:CipherSpi.java   
public IES()
{
    super(new IESEngine(
           new DHBasicAgreement(),
           new KDF2BytesGenerator(new SHA1Digest()),
           new HMac(new SHA1Digest())));
}
项目:irma_future_id    文件:IESCipher.java   
public IESwithDESede()
{
    super(new IESEngine(new DHBasicAgreement(),
        new KDF2BytesGenerator(new SHA1Digest()),
        new HMac(new SHA1Digest()),
        new PaddedBufferedBlockCipher(new DESedeEngine())));
}
项目:irma_future_id    文件:IESCipher.java   
public IESwithAES()
{
    super(new IESEngine(new DHBasicAgreement(),
        new KDF2BytesGenerator(new SHA1Digest()),
        new HMac(new SHA1Digest()),
        new PaddedBufferedBlockCipher(new AESEngine())));
}
项目:irma_future_id    文件:IESCipher.java   
public ECIESwithDESede()
{
    super(new IESEngine(new ECDHBasicAgreement(),
        new KDF2BytesGenerator(new SHA1Digest()),
        new HMac(new SHA1Digest()),
        new PaddedBufferedBlockCipher(new DESedeEngine())));
}
项目:irma_future_id    文件:IESCipher.java   
public ECIESwithAES()
{
    super(new IESEngine(new ECDHBasicAgreement(),
        new KDF2BytesGenerator(new SHA1Digest()),
        new HMac(new SHA1Digest()),
        new PaddedBufferedBlockCipher(new AESEngine())));
}
项目:irma_future_id    文件:CipherSpi.java   
public IES()
{
    super(new IESEngine(
           new DHBasicAgreement(),
           new KDF2BytesGenerator(new SHA1Digest()),
           new HMac(new SHA1Digest())));
}
项目:bc-java    文件:IESCipher.java   
public IESwithDESede()
{
    super(new IESEngine(new DHBasicAgreement(),
        new KDF2BytesGenerator(new SHA1Digest()),
        new HMac(new SHA1Digest()),
        new PaddedBufferedBlockCipher(new DESedeEngine())));
}
项目:bc-java    文件:IESCipher.java   
public IESwithAES()
{
    super(new IESEngine(new DHBasicAgreement(),
        new KDF2BytesGenerator(new SHA1Digest()),
        new HMac(new SHA1Digest()),
        new PaddedBufferedBlockCipher(new AESEngine())));
}
项目:bc-java    文件:IESCipher.java   
public ECIESwithDESede()
{
    super(new IESEngine(new ECDHBasicAgreement(),
        new KDF2BytesGenerator(new SHA1Digest()),
        new HMac(new SHA1Digest()),
        new PaddedBufferedBlockCipher(new DESedeEngine())));
}
项目:bc-java    文件:IESCipher.java   
public ECIESwithAES()
{
    super(new IESEngine(new ECDHBasicAgreement(),
        new KDF2BytesGenerator(new SHA1Digest()),
        new HMac(new SHA1Digest()),
        new PaddedBufferedBlockCipher(new AESEngine())));
}
项目:bc-java    文件:CipherSpi.java   
public IES()
{
    super(new IESEngine(
           new DHBasicAgreement(),
           new KDF2BytesGenerator(new SHA1Digest()),
           new HMac(new SHA1Digest())));
}
项目:ipack    文件:ECDHKEKGenerator.java   
public ECDHKEKGenerator(
    Digest digest)
{
    this.kdf = new KDF2BytesGenerator(digest);
}
项目:ipack    文件:IESCipher.java   
public IES()
{
    super(new IESEngine(new DHBasicAgreement(),
        new KDF2BytesGenerator(new SHA1Digest()),
        new HMac(new SHA1Digest())));
}
项目:ipack    文件:IESCipher.java   
public ECIES()
{
    super(new IESEngine(new ECDHBasicAgreement(),
        new KDF2BytesGenerator(new SHA1Digest()),
        new HMac(new SHA1Digest())));
}
项目:gwt-crypto    文件:ECDHKEKGenerator.java   
public ECDHKEKGenerator(
    Digest digest)
{
    this.kdf = new KDF2BytesGenerator(digest);
}
项目:Aki-SSL    文件:ECDHKEKGenerator.java   
public ECDHKEKGenerator(
    Digest digest)
{
    this.kdf = new KDF2BytesGenerator(digest);
}
项目:Aki-SSL    文件:IESCipher.java   
public IES()
{
    super(new IESEngine(new DHBasicAgreement(),
        new KDF2BytesGenerator(new SHA1Digest()),
        new HMac(new SHA1Digest())));
}
项目:Aki-SSL    文件:IESCipher.java   
public OldIES()
{
    super(new OldIESEngine(new DHBasicAgreement(),
        new KDF2BytesGenerator(new SHA1Digest()),
        new HMac(new SHA1Digest())));
}
项目:Aki-SSL    文件:KeyAgreementSpi.java   
public DHwithSHA1KDF()
{
    super("ECDHwithSHA1KDF", new ECDHBasicAgreement(), new KDF2BytesGenerator(new SHA1Digest()));
}