Java 类org.bouncycastle.openpgp.operator.PGPDataDecryptor 实例源码

项目:gwt-crypto    文件:BcUtil.java   
public static PGPDataDecryptor createDataDecryptor(boolean withIntegrityPacket, BlockCipher engine, byte[] key)
{
    final BufferedBlockCipher c = createStreamCipher(false, engine, withIntegrityPacket, key);

    return new PGPDataDecryptor()
    {
        public InputStream getInputStream(InputStream in)
        {
            return new CipherInputStream(in, c);
        }

        public int getBlockSize()
        {
            return c.getBlockSize();
        }

        public PGPDigestCalculator getIntegrityCalculator()
        {
            return new SHA1PGPDigestCalculator();
        }
    };
}
项目:CryptMeme    文件:BcUtil.java   
public static PGPDataDecryptor createDataDecryptor(boolean withIntegrityPacket, BlockCipher engine, byte[] key)
{
    final BufferedBlockCipher c = createStreamCipher(false, engine, withIntegrityPacket, key);

    return new PGPDataDecryptor()
    {
        public InputStream getInputStream(InputStream in)
        {
            return new CipherInputStream(in, c);
        }

        public int getBlockSize()
        {
            return c.getBlockSize();
        }

        public PGPDigestCalculator getIntegrityCalculator()
        {
            return new SHA1PGPDigestCalculator();
        }
    };
}
项目:CryptMeme    文件:JcePublicKeyDataDecryptorFactoryBuilder.java   
public PublicKeyDataDecryptorFactory build(final PrivateKey privKey)
{
     return new PublicKeyDataDecryptorFactory()
     {
         public byte[] recoverSessionData(int keyAlgorithm, byte[][] secKeyData)
             throws PGPException
         {
             if (keyAlgorithm == PublicKeyAlgorithmTags.ECDH)
             {
                 throw new PGPException("ECDH requires use of PGPPrivateKey for decryption");
             }
             return decryptSessionData(keyAlgorithm, privKey, secKeyData);
         }

         public PGPDataDecryptor createDataDecryptor(boolean withIntegrityPacket, int encAlgorithm, byte[] key)
             throws PGPException
         {
             return contentHelper.createDataDecryptor(withIntegrityPacket, encAlgorithm, key);
         }
     };
}
项目:CryptMeme    文件:JcePublicKeyDataDecryptorFactoryBuilder.java   
public PublicKeyDataDecryptorFactory build(final PGPPrivateKey privKey)
{
     return new PublicKeyDataDecryptorFactory()
     {
         public byte[] recoverSessionData(int keyAlgorithm, byte[][] secKeyData)
             throws PGPException
         {
             if (keyAlgorithm == PublicKeyAlgorithmTags.ECDH)
             {
                 return decryptSessionData(privKey.getPrivateKeyDataPacket(), privKey.getPublicKeyPacket(), secKeyData);
             }

             return decryptSessionData(keyAlgorithm, keyConverter.getPrivateKey(privKey), secKeyData);
         }

         public PGPDataDecryptor createDataDecryptor(boolean withIntegrityPacket, int encAlgorithm, byte[] key)
             throws PGPException
         {
             return contentHelper.createDataDecryptor(withIntegrityPacket, encAlgorithm, key);
         }
     };
}
项目:irma_future_id    文件:BcUtil.java   
public static PGPDataDecryptor createDataDecryptor(boolean withIntegrityPacket, BlockCipher engine, byte[] key)
{
    final BufferedBlockCipher c = createStreamCipher(false, engine, withIntegrityPacket, key);

    return new PGPDataDecryptor()
    {
        public InputStream getInputStream(InputStream in)
        {
            return new CipherInputStream(in, c);
        }

        public int getBlockSize()
        {
            return c.getBlockSize();
        }

        public PGPDigestCalculator getIntegrityCalculator()
        {
            return new SHA1PGPDigestCalculator();
        }
    };
}
项目:irma_future_id    文件:JcePublicKeyDataDecryptorFactoryBuilder.java   
public PublicKeyDataDecryptorFactory build(final PrivateKey privKey)
{
     return new PublicKeyDataDecryptorFactory()
     {
         public byte[] recoverSessionData(int keyAlgorithm, BigInteger[] secKeyData)
             throws PGPException
         {
             return decryptSessionData(keyAlgorithm, privKey, secKeyData);
         }

         public PGPDataDecryptor createDataDecryptor(boolean withIntegrityPacket, int encAlgorithm, byte[] key)
             throws PGPException
         {
             return contentHelper.createDataDecryptor(withIntegrityPacket, encAlgorithm, key);
         }
     };
}
项目:irma_future_id    文件:JcePublicKeyDataDecryptorFactoryBuilder.java   
public PublicKeyDataDecryptorFactory build(final PGPPrivateKey privKey)
{
     return new PublicKeyDataDecryptorFactory()
     {
         public byte[] recoverSessionData(int keyAlgorithm, BigInteger[] secKeyData)
             throws PGPException
         {
             return decryptSessionData(keyAlgorithm, keyConverter.getPrivateKey(privKey), secKeyData);
         }

         public PGPDataDecryptor createDataDecryptor(boolean withIntegrityPacket, int encAlgorithm, byte[] key)
             throws PGPException
         {
             return contentHelper.createDataDecryptor(withIntegrityPacket, encAlgorithm, key);
         }
     };
}
项目:bc-java    文件:BcUtil.java   
public static PGPDataDecryptor createDataDecryptor(boolean withIntegrityPacket, BlockCipher engine, byte[] key)
{
    final BufferedBlockCipher c = createStreamCipher(false, engine, withIntegrityPacket, key);

    return new PGPDataDecryptor()
    {
        public InputStream getInputStream(InputStream in)
        {
            return new CipherInputStream(in, c);
        }

        public int getBlockSize()
        {
            return c.getBlockSize();
        }

        public PGPDigestCalculator getIntegrityCalculator()
        {
            return new SHA1PGPDigestCalculator();
        }
    };
}
项目:bc-java    文件:JcePublicKeyDataDecryptorFactoryBuilder.java   
public PublicKeyDataDecryptorFactory build(final PrivateKey privKey)
{
     return new PublicKeyDataDecryptorFactory()
     {
         public byte[] recoverSessionData(int keyAlgorithm, BigInteger[] secKeyData)
             throws PGPException
         {
             return decryptSessionData(keyAlgorithm, privKey, secKeyData);
         }

         public PGPDataDecryptor createDataDecryptor(boolean withIntegrityPacket, int encAlgorithm, byte[] key)
             throws PGPException
         {
             return contentHelper.createDataDecryptor(withIntegrityPacket, encAlgorithm, key);
         }
     };
}
项目:bc-java    文件:JcePublicKeyDataDecryptorFactoryBuilder.java   
public PublicKeyDataDecryptorFactory build(final PGPPrivateKey privKey)
{
     return new PublicKeyDataDecryptorFactory()
     {
         public byte[] recoverSessionData(int keyAlgorithm, BigInteger[] secKeyData)
             throws PGPException
         {
             return decryptSessionData(keyAlgorithm, keyConverter.getPrivateKey(privKey), secKeyData);
         }

         public PGPDataDecryptor createDataDecryptor(boolean withIntegrityPacket, int encAlgorithm, byte[] key)
             throws PGPException
         {
             return contentHelper.createDataDecryptor(withIntegrityPacket, encAlgorithm, key);
         }
     };
}
项目:gwt-crypto    文件:BcPBEDataDecryptorFactory.java   
public PGPDataDecryptor createDataDecryptor(boolean withIntegrityPacket, int encAlgorithm, byte[] key)
    throws PGPException
{
    BlockCipher engine = BcImplProvider.createBlockCipher(encAlgorithm);

    return BcUtil.createDataDecryptor(withIntegrityPacket, engine, key);
}
项目:gwt-crypto    文件:BcPublicKeyDataDecryptorFactory.java   
public PGPDataDecryptor createDataDecryptor(boolean withIntegrityPacket, int encAlgorithm, byte[] key)
    throws PGPException
{
    BlockCipher engine = BcImplProvider.createBlockCipher(encAlgorithm);

    return BcUtil.createDataDecryptor(withIntegrityPacket, engine, key);
}
项目:CryptMeme    文件:BcPBEDataDecryptorFactory.java   
public PGPDataDecryptor createDataDecryptor(boolean withIntegrityPacket, int encAlgorithm, byte[] key)
    throws PGPException
{
    BlockCipher engine = BcImplProvider.createBlockCipher(encAlgorithm);

    return BcUtil.createDataDecryptor(withIntegrityPacket, engine, key);
}
项目:CryptMeme    文件:BcPublicKeyDataDecryptorFactory.java   
public PGPDataDecryptor createDataDecryptor(boolean withIntegrityPacket, int encAlgorithm, byte[] key)
    throws PGPException
{
    BlockCipher engine = BcImplProvider.createBlockCipher(encAlgorithm);

    return BcUtil.createDataDecryptor(withIntegrityPacket, engine, key);
}
项目:irma_future_id    文件:BcPBEDataDecryptorFactory.java   
public PGPDataDecryptor createDataDecryptor(boolean withIntegrityPacket, int encAlgorithm, byte[] key)
    throws PGPException
{
    BlockCipher engine = BcImplProvider.createBlockCipher(encAlgorithm);

    return BcUtil.createDataDecryptor(withIntegrityPacket, engine, key);
}
项目:irma_future_id    文件:BcPublicKeyDataDecryptorFactory.java   
public PGPDataDecryptor createDataDecryptor(boolean withIntegrityPacket, int encAlgorithm, byte[] key)
    throws PGPException
{
    BlockCipher engine = BcImplProvider.createBlockCipher(encAlgorithm);

    return BcUtil.createDataDecryptor(withIntegrityPacket, engine, key);
}
项目:bc-java    文件:BcPBEDataDecryptorFactory.java   
public PGPDataDecryptor createDataDecryptor(boolean withIntegrityPacket, int encAlgorithm, byte[] key)
    throws PGPException
{
    BlockCipher engine = BcImplProvider.createBlockCipher(encAlgorithm);

    return BcUtil.createDataDecryptor(withIntegrityPacket, engine, key);
}
项目:bc-java    文件:BcPublicKeyDataDecryptorFactory.java   
public PGPDataDecryptor createDataDecryptor(boolean withIntegrityPacket, int encAlgorithm, byte[] key)
    throws PGPException
{
    BlockCipher engine = BcImplProvider.createBlockCipher(encAlgorithm);

    return BcUtil.createDataDecryptor(withIntegrityPacket, engine, key);
}