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

项目:gwt-crypto    文件:BcPGPContentVerifierBuilderProvider.java   
public PGPContentVerifier build(final PGPPublicKey publicKey)
    throws PGPException
{
    final Signer signer = BcImplProvider.createSigner(keyAlgorithm, hashAlgorithm);

    signer.init(false, keyConverter.getPublicKey(publicKey));

    return new PGPContentVerifier()
    {
        public int getHashAlgorithm()
        {
            return hashAlgorithm;
        }

        public int getKeyAlgorithm()
        {
            return keyAlgorithm;
        }

        public long getKeyID()
        {
            return publicKey.getKeyID();
        }

        public boolean verify(byte[] expected)
        {
            return signer.verifySignature(expected);
        }

        public OutputStream getOutputStream()
        {
            return new SignerOutputStream(signer);
        }
    };
}
项目:CryptMeme    文件:BcPGPContentVerifierBuilderProvider.java   
public PGPContentVerifier build(final PGPPublicKey publicKey)
    throws PGPException
{
    final Signer signer = BcImplProvider.createSigner(keyAlgorithm, hashAlgorithm);

    signer.init(false, keyConverter.getPublicKey(publicKey));

    return new PGPContentVerifier()
    {
        public int getHashAlgorithm()
        {
            return hashAlgorithm;
        }

        public int getKeyAlgorithm()
        {
            return keyAlgorithm;
        }

        public long getKeyID()
        {
            return publicKey.getKeyID();
        }

        public boolean verify(byte[] expected)
        {
            return signer.verifySignature(expected);
        }

        public OutputStream getOutputStream()
        {
            return new SignerOutputStream(signer);
        }
    };
}
项目:irma_future_id    文件:BcPGPContentVerifierBuilderProvider.java   
public PGPContentVerifier build(final PGPPublicKey publicKey)
    throws PGPException
{
    final Signer signer = BcImplProvider.createSigner(keyAlgorithm, hashAlgorithm);

    signer.init(false, keyConverter.getPublicKey(publicKey));

    return new PGPContentVerifier()
    {
        public int getHashAlgorithm()
        {
            return hashAlgorithm;
        }

        public int getKeyAlgorithm()
        {
            return keyAlgorithm;
        }

        public long getKeyID()
        {
            return publicKey.getKeyID();
        }

        public boolean verify(byte[] expected)
        {
            return signer.verifySignature(expected);
        }

        public OutputStream getOutputStream()
        {
            return new SignerOutputStream(signer);
        }
    };
}
项目:bc-java    文件:BcPGPContentVerifierBuilderProvider.java   
public PGPContentVerifier build(final PGPPublicKey publicKey)
    throws PGPException
{
    final Signer signer = BcImplProvider.createSigner(keyAlgorithm, hashAlgorithm);

    signer.init(false, keyConverter.getPublicKey(publicKey));

    return new PGPContentVerifier()
    {
        public int getHashAlgorithm()
        {
            return hashAlgorithm;
        }

        public int getKeyAlgorithm()
        {
            return keyAlgorithm;
        }

        public long getKeyID()
        {
            return publicKey.getKeyID();
        }

        public boolean verify(byte[] expected)
        {
            return signer.verifySignature(expected);
        }

        public OutputStream getOutputStream()
        {
            return new SignerOutputStream(signer);
        }
    };
}