Examples of verify()


Examples of org.bouncycastle.openpgp.PGPOnePassSignature.verify()

        }

        if (signature != null) {
            signature.update(answer);
            PGPSignatureList sigList = (PGPSignatureList) pgpFactory.nextObject();
            if (!signature.verify(sigList.get(0))) {
                throw new SignatureException("Cannot verify PGP signature");
            }
        }

        return answer;
View Full Code Here

Examples of org.bouncycastle.openpgp.PGPPBEEncryptedData.verify()

        while ((ch = unc.read()) >= 0)
        {
            bOut.write(ch);
        }

        if (pbe.isIntegrityProtected() && !pbe.verify())
        {
            fail("integrity check failed");
        }

        return bOut.toByteArray();
View Full Code Here

Examples of org.bouncycastle.openpgp.PGPPublicKeyEncryptedData.verify()

                throw new PGPException("message is not a simple encrypted file - type unknown.");
            }

            if (pbe.isIntegrityProtected())
            {
                if (!pbe.verify())
                {
                    System.err.println("message failed integrity check");
                }
                else
                {
View Full Code Here

Examples of org.bouncycastle.openpgp.PGPSignature.verify()

                processLine(sig, lineOut.toByteArray());
            }
            while (lookAhead != -1);
        }

        if (sig.verify())
        {
            System.out.println("signature verified.");
        }
        else
        {
View Full Code Here

Examples of org.bouncycastle.pqc.crypto.gmss.util.WinternitzOTSVerify.Verify()

            // and reuse this signature to compute the first leaf of acual layer
            // more efficiently (by verifiing the signature)
            ots = new WinternitzOTSignature(OTSseed, digestProvider.get(), otsIndex[h]);
            currentRootSigs[h] = ots.getSignature(lowerRoot);
            WinternitzOTSVerify otsver = new WinternitzOTSVerify(digestProvider.get(), otsIndex[h]);
            help = otsver.Verify(lowerRoot, currentRootSigs[h]);
        }
        // update the tree with the first leaf
        treeToConstruct.update(help);

        int seedForTreehashIndex = 3;
View Full Code Here

Examples of org.bouncycastle.x509.X509AttributeCertificate.verify()

       
        X509AttributeCertificate aCert = gen.generate(privKey, "BC");
       
        aCert.checkValidity();
       
        aCert.verify(pubKey, "BC");
       
        AttributeCertificateHolder holder = aCert.getHolder();
       
        if (holder.getEntityNames() != null)
        {
View Full Code Here

Examples of org.bouncycastle.x509.X509V2AttributeCertificate.verify()

    {
        X509AttributeCertificate    aCert = new X509V2AttributeCertificate(attrCert);
        CertificateFactory          fact = CertificateFactory.getInstance("X.509","BC");
        X509Certificate             sCert = (X509Certificate)fact.generateCertificate(new ByteArrayInputStream(signCert));
       
        aCert.verify(sCert.getPublicKey(), "BC");
       
        //
        // search test
        //
       
View Full Code Here

Examples of org.codehaus.plexus.digest.Digester.verify()

        {
            throw new IllegalArgumentException( "Unsupported checksum file: " + checksumFile );
        }

        String expected = FileUtils.fileRead( checksumFile, "UTF-8" );
        digester.verify( dataFile, expected );
    }

}
View Full Code Here

Examples of org.codehaus.plexus.digest.Md5Digester.verify()

      String md5Hash = contentAsString(md5Item);
      String sha1Hash = contentAsString(sha1Item);

      Md5Digester md5Digester = new Md5Digester();
      md5Digester.verify(mdFile, md5Hash);
      Sha1Digester sha1Digester = new Sha1Digester();
      sha1Digester.verify(mdFile, sha1Hash);
    }
    finally {
      mdFile.delete();
View Full Code Here

Examples of org.codehaus.plexus.digest.Sha1Digester.verify()

      String sha1Hash = contentAsString(sha1Item);

      Md5Digester md5Digester = new Md5Digester();
      md5Digester.verify(mdFile, md5Hash);
      Sha1Digester sha1Digester = new Sha1Digester();
      sha1Digester.verify(mdFile, sha1Hash);
    }
    finally {
      mdFile.delete();
    }
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.