Java 类org.bouncycastle.crypto.engines.RC2Engine 实例源码

项目:ipack    文件:EnvelopedDataHelper.java   
static Wrapper createRFC3211Wrapper(ASN1ObjectIdentifier algorithm)
    throws CMSException
{
    if (NISTObjectIdentifiers.id_aes128_CBC.equals(algorithm)
        || NISTObjectIdentifiers.id_aes192_CBC.equals(algorithm)
        || NISTObjectIdentifiers.id_aes256_CBC.equals(algorithm))
    {
        return new RFC3211WrapEngine(new AESEngine());
    }
    else if (PKCSObjectIdentifiers.des_EDE3_CBC.equals(algorithm))
    {
        return new RFC3211WrapEngine(new DESedeEngine());
    }
    else if (OIWObjectIdentifiers.desCBC.equals(algorithm))
    {
        return new RFC3211WrapEngine(new DESEngine());
    }
    else if (PKCSObjectIdentifiers.RC2_CBC.equals(algorithm))
    {
        return new RFC3211WrapEngine(new RC2Engine());
    }
    else
    {
        throw new CMSException("cannot recognise wrapper: " + algorithm);
    }
}
项目:gwt-crypto    文件:EnvelopedDataHelper.java   
static Wrapper createRFC3211Wrapper(ASN1ObjectIdentifier algorithm)
    throws CMSException
{
    if (NISTObjectIdentifiers.id_aes128_CBC.equals(algorithm)
        || NISTObjectIdentifiers.id_aes192_CBC.equals(algorithm)
        || NISTObjectIdentifiers.id_aes256_CBC.equals(algorithm))
    {
        return new RFC3211WrapEngine(new AESEngine());
    }
    else if (PKCSObjectIdentifiers.des_EDE3_CBC.equals(algorithm))
    {
        return new RFC3211WrapEngine(new DESedeEngine());
    }
    else if (OIWObjectIdentifiers.desCBC.equals(algorithm))
    {
        return new RFC3211WrapEngine(new DESEngine());
    }
    else if (PKCSObjectIdentifiers.RC2_CBC.equals(algorithm))
    {
        return new RFC3211WrapEngine(new RC2Engine());
    }
    else
    {
        throw new CMSException("cannot recognise wrapper: " + algorithm);
    }
}
项目:vsDiaryWriter    文件:BlockCiphers.java   
private static void initBlockCipherEngines() {
    blockCipherEngines.put("MARS", MarsEngine.class);
    blockCipherEngines.put("AES", AESEngine.class);
    blockCipherEngines.put("Blowfish", BlowfishEngine.class);
    blockCipherEngines.put("Camellia", CamelliaEngine.class);
    blockCipherEngines.put("CAST5", CAST5Engine.class);
    blockCipherEngines.put("CAST6", CAST6Engine.class);
    blockCipherEngines.put("DESede", DESedeEngine.class);
    blockCipherEngines.put("DES", DESEngine.class);
    blockCipherEngines.put("GOST28147", GOST28147Engine.class);
    blockCipherEngines.put("IDEA", IDEAEngine.class);
    blockCipherEngines.put("Noekeon", NoekeonEngine.class);
    blockCipherEngines.put("RC2", RC2Engine.class);
    blockCipherEngines.put("RC5", RC532Engine.class);
    blockCipherEngines.put("RC6", RC6Engine.class);
    blockCipherEngines.put("SEED", SEEDEngine.class);
    blockCipherEngines.put("Serpent", SerpentEngine.class);
    blockCipherEngines.put("Shacal2", Shacal2Engine.class);
    blockCipherEngines.put("Skipjack", SkipjackEngine.class);
    blockCipherEngines.put("SM4", SM4Engine.class);
    blockCipherEngines.put("TEA", TEAEngine.class);
    blockCipherEngines.put("Twofish", TwofishEngine.class);
    blockCipherEngines.put("XTEA", XTEAEngine.class);
    blockCipherEngines.put("Threefish", ThreefishEngine.class);
}
项目:Aki-SSL    文件:EnvelopedDataHelper.java   
static Wrapper createRFC3211Wrapper(ASN1ObjectIdentifier algorithm)
    throws CMSException
{
    if (NISTObjectIdentifiers.id_aes128_CBC.equals(algorithm)
        || NISTObjectIdentifiers.id_aes192_CBC.equals(algorithm)
        || NISTObjectIdentifiers.id_aes256_CBC.equals(algorithm))
    {
        return new RFC3211WrapEngine(new AESEngine());
    }
    else if (PKCSObjectIdentifiers.des_EDE3_CBC.equals(algorithm))
    {
        return new RFC3211WrapEngine(new DESedeEngine());
    }
    else if (OIWObjectIdentifiers.desCBC.equals(algorithm))
    {
        return new RFC3211WrapEngine(new DESEngine());
    }
    else if (PKCSObjectIdentifiers.RC2_CBC.equals(algorithm))
    {
        return new RFC3211WrapEngine(new RC2Engine());
    }
    else
    {
        throw new CMSException("cannot recognise wrapper: " + algorithm);
    }
}
项目:irma_future_id    文件:EnvelopedDataHelper.java   
static Wrapper createRFC3211Wrapper(ASN1ObjectIdentifier algorithm)
    throws CMSException
{
    if (NISTObjectIdentifiers.id_aes128_CBC.equals(algorithm)
        || NISTObjectIdentifiers.id_aes192_CBC.equals(algorithm)
        || NISTObjectIdentifiers.id_aes256_CBC.equals(algorithm))
    {
        return new RFC3211WrapEngine(new AESEngine());
    }
    else if (PKCSObjectIdentifiers.des_EDE3_CBC.equals(algorithm))
    {
        return new RFC3211WrapEngine(new DESedeEngine());
    }
    else if (OIWObjectIdentifiers.desCBC.equals(algorithm))
    {
        return new RFC3211WrapEngine(new DESEngine());
    }
    else if (PKCSObjectIdentifiers.RC2_CBC.equals(algorithm))
    {
        return new RFC3211WrapEngine(new RC2Engine());
    }
    else
    {
        throw new CMSException("cannot recognise wrapper: " + algorithm);
    }
}
项目:bc-java    文件:EnvelopedDataHelper.java   
static Wrapper createRFC3211Wrapper(ASN1ObjectIdentifier algorithm)
    throws CMSException
{
    if (NISTObjectIdentifiers.id_aes128_CBC.equals(algorithm)
        || NISTObjectIdentifiers.id_aes192_CBC.equals(algorithm)
        || NISTObjectIdentifiers.id_aes256_CBC.equals(algorithm))
    {
        return new RFC3211WrapEngine(new AESEngine());
    }
    else if (PKCSObjectIdentifiers.des_EDE3_CBC.equals(algorithm))
    {
        return new RFC3211WrapEngine(new DESedeEngine());
    }
    else if (OIWObjectIdentifiers.desCBC.equals(algorithm))
    {
        return new RFC3211WrapEngine(new DESEngine());
    }
    else if (PKCSObjectIdentifiers.RC2_CBC.equals(algorithm))
    {
        return new RFC3211WrapEngine(new RC2Engine());
    }
    else
    {
        throw new CMSException("cannot recognise wrapper: " + algorithm);
    }
}
项目:gwt-crypto    文件:CipherStreamTest.java   
private void performTests()
    throws Exception
{
    testModes(new BlowfishEngine(), new BlowfishEngine(), 16);
    testModes(new DESEngine(), new DESEngine(), 8);
    testModes(new DESedeEngine(), new DESedeEngine(), 24);
    testModes(new TEAEngine(), new TEAEngine(), 16);
    testModes(new CAST5Engine(), new CAST5Engine(), 16);
    testModes(new RC2Engine(), new RC2Engine(), 16);
    testModes(new XTEAEngine(), new XTEAEngine(), 16);

    testModes(new AESEngine(), new AESEngine(), 16);
    testModes(new NoekeonEngine(), new NoekeonEngine(), 16);
    testModes(new TwofishEngine(), new TwofishEngine(), 16);
    testModes(new CAST6Engine(), new CAST6Engine(), 16);
    testModes(new SEEDEngine(), new SEEDEngine(), 16);
    testModes(new SerpentEngine(), new SerpentEngine(), 16);
    testModes(new RC6Engine(), new RC6Engine(), 16);
    testModes(new CamelliaEngine(), new CamelliaEngine(), 16);
    testModes(new ThreefishEngine(ThreefishEngine.BLOCKSIZE_512),
        new ThreefishEngine(ThreefishEngine.BLOCKSIZE_512), 64);

    testMode(new RC4Engine(), new KeyParameter(new byte[16]));
    testMode(new Salsa20Engine(), new ParametersWithIV(new KeyParameter(new byte[16]), new byte[8]));
    testMode(new XSalsa20Engine(), new ParametersWithIV(new KeyParameter(new byte[32]), new byte[24]));
    testMode(new ChaChaEngine(), new ParametersWithIV(new KeyParameter(new byte[16]), new byte[8]));
    testMode(new Grainv1Engine(), new ParametersWithIV(new KeyParameter(new byte[16]), new byte[8]));
    testMode(new Grain128Engine(), new ParametersWithIV(new KeyParameter(new byte[16]), new byte[12]));
    testMode(new HC128Engine(), new KeyParameter(new byte[16]));
    testMode(new HC256Engine(), new ParametersWithIV(new KeyParameter(new byte[16]), new byte[16]));

    testSkipping(new Salsa20Engine(), new ParametersWithIV(new KeyParameter(new byte[16]), new byte[8]));
    testSkipping(new SICBlockCipher(new AESEngine()), new ParametersWithIV(new KeyParameter(new byte[16]), new byte[16]));
}
项目:ipack    文件:RC2.java   
public ECB()
{
    super(new RC2Engine());
}
项目:ipack    文件:RC2.java   
public CBC()
{
    super(new CBCBlockCipher(new RC2Engine()), 64);
}
项目:ipack    文件:RC2.java   
public CBCMAC()
{
    super(new CBCBlockCipherMac(new RC2Engine()));
}
项目:ipack    文件:RC2.java   
public CFB8MAC()
{
    super(new CFBBlockCipherMac(new RC2Engine()));
}
项目:ipack    文件:RC2.java   
public PBEWithMD5AndRC2()
{
    super(new CBCBlockCipher(new RC2Engine()));
}
项目:ipack    文件:RC2.java   
public PBEWithSHA1AndRC2()
{
    super(new CBCBlockCipher(new RC2Engine()));
}
项目:ipack    文件:RC2.java   
public PBEWithSHAAnd128BitRC2()
{
    super(new CBCBlockCipher(new RC2Engine()));
}
项目:ipack    文件:RC2.java   
public PBEWithSHAAnd40BitRC2()
{
    super(new CBCBlockCipher(new RC2Engine()));
}
项目:gwt-crypto    文件:RC2Test.java   
RC2Test()
{
    super(tests, new RC2Engine(), new KeyParameter(new byte[16]));
}
项目:Aki-SSL    文件:RC2.java   
public ECB()
{
    super(new RC2Engine());
}
项目:Aki-SSL    文件:RC2.java   
public CBC()
{
    super(new CBCBlockCipher(new RC2Engine()), 64);
}
项目:Aki-SSL    文件:RC2.java   
public CBCMAC()
{
    super(new CBCBlockCipherMac(new RC2Engine()));
}
项目:Aki-SSL    文件:RC2.java   
public CFB8MAC()
{
    super(new CFBBlockCipherMac(new RC2Engine()));
}
项目:Aki-SSL    文件:RC2.java   
public PBEWithMD5AndRC2()
{
    super(new CBCBlockCipher(new RC2Engine()), PKCS5S1, MD5, 64, 8);
}
项目:Aki-SSL    文件:RC2.java   
public PBEWithSHA1AndRC2()
{
    super(new CBCBlockCipher(new RC2Engine()), PKCS5S1, SHA1, 64, 8);
}
项目:Aki-SSL    文件:RC2.java   
public PBEWithSHAAnd128BitRC2()
{
    super(new CBCBlockCipher(new RC2Engine()), PKCS12, SHA1, 128, 8);
}
项目:Aki-SSL    文件:RC2.java   
public PBEWithSHAAnd40BitRC2()
{
    super(new CBCBlockCipher(new RC2Engine()), PKCS12, SHA1, 40, 8);
}
项目:subshare    文件:MACCalculatorFactoryImpl.java   
@Override
public MACCalculator _createMACCalculator() {
    final BlockCipher cipher = new RC2Engine();
    return new MACCalculatorImpl(new CBCBlockCipherMac(cipher), cipher.getBlockSize(), cipher.getBlockSize());
}
项目:subshare    文件:MACCalculatorFactoryImpl.java   
@Override
public MACCalculator _createMACCalculator() {
    final BlockCipher cipher = new RC2Engine();
    return new MACCalculatorImpl(new CFBBlockCipherMac(cipher), cipher.getBlockSize(), cipher.getBlockSize());
}
项目:CryptMeme    文件:RC2.java   
public ECB()
{
    super(new RC2Engine());
}
项目:CryptMeme    文件:RC2.java   
public CBC()
{
    super(new CBCBlockCipher(new RC2Engine()), 64);
}
项目:CryptMeme    文件:RC2.java   
public CBCMAC()
{
    super(new CBCBlockCipherMac(new RC2Engine()));
}
项目:CryptMeme    文件:RC2.java   
public CFB8MAC()
{
    super(new CFBBlockCipherMac(new RC2Engine()));
}
项目:CryptMeme    文件:RC2.java   
public PBEWithMD5AndRC2()
{
    super(new CBCBlockCipher(new RC2Engine()));
}
项目:CryptMeme    文件:RC2.java   
public PBEWithSHA1AndRC2()
{
    super(new CBCBlockCipher(new RC2Engine()));
}
项目:CryptMeme    文件:RC2.java   
public PBEWithSHAAnd128BitRC2()
{
    super(new CBCBlockCipher(new RC2Engine()));
}
项目:CryptMeme    文件:RC2.java   
public PBEWithSHAAnd40BitRC2()
{
    super(new CBCBlockCipher(new RC2Engine()));
}
项目:irma_future_id    文件:RC2Test.java   
RC2Test()
{
    super(tests, new RC2Engine(), new KeyParameter(new byte[16]));
}
项目:irma_future_id    文件:RC2.java   
public ECB()
{
    super(new RC2Engine());
}
项目:irma_future_id    文件:RC2.java   
public CBC()
{
    super(new CBCBlockCipher(new RC2Engine()), 64);
}
项目:irma_future_id    文件:RC2.java   
public CBCMAC()
{
    super(new CBCBlockCipherMac(new RC2Engine()));
}
项目:irma_future_id    文件:RC2.java   
public CFB8MAC()
{
    super(new CFBBlockCipherMac(new RC2Engine()));
}
项目:irma_future_id    文件:RC2.java   
public PBEWithMD5AndRC2()
{
    super(new CBCBlockCipher(new RC2Engine()));
}