Examples of initVerify()


Examples of java.security.Signature.initVerify()

            fail("ECGOST parameters incorrect.");
        }

        Signature sig = Signature.getInstance(algorithm, "BC");

        sig.initVerify(pubKey);

        sig.update(req.getCertificationRequestInfo().getEncoded());

        if (!sig.verify(req.getSignature().getBytes()))
        {
View Full Code Here

Examples of org.apache.harmony.security.tests.support.MySignature1.initVerify()

   * Class under test for void initVerify(PublicKey)
   */
  public void testInitVerifyPublicKey() throws InvalidKeyException {
    MySignature1 s = new MySignature1("ABC");

        s.initVerify(new MyPublicKey());
        assertEquals("state", Signature.VERIFY, s.getState());
        assertTrue("initVerify() failed", s.runEngineInitVerify);
  }

  /*
 
View Full Code Here

Examples of org.apache.xml.security.algorithms.SignatureAlgorithm.initVerify()

                log.debug("jceSigProvider     = " + sa.getJCEProviderName());
                log.debug("PublicKey = " + pk);
            }
            byte sigBytes[] = null;
            try {
                sa.initVerify(pk);

                // Get the canonicalized (normalized) SignedInfo
                SignerOutputStream so = new SignerOutputStream(sa);
                OutputStream bos = new UnsyncBufferedOutputStream(so);
View Full Code Here

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

        if (sigPublicKey == null) {
            throw new IllegalArgumentException("Signature public key is null, cannot proceed");
        }

        PGPOnePassSignature signature = signatureList.get(0);
        signature.initVerify(sigPublicKey, "BC");
        return signature;
    }

    /**
     * Sets if the encrypted file should be written in ascii visible text
View Full Code Here

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

        PGPObjectFactory           pgpFact = new PGPObjectFactory(aIn);
        PGPSignatureList           p3 = (PGPSignatureList)pgpFact.nextObject();
        PGPSignature               sig = p3.get(0);

        sig.initVerify(pgpRings.getPublicKey(sig.getKeyID()), "BC");

        //
        // read the input, making sure we ingore the last newline.
        //
View Full Code Here

Examples of org.keyczar.interfaces.VerifyingStream.initVerify()

      ByteBuffer signatureCopy = signature.duplicate();
      VerifyingStream stream = VERIFY_CACHE.get(key);
      if (stream == null) {
        stream = (VerifyingStream) key.getStream();
      }
      stream.initVerify();
      stream.updateVerify(dataCopy);
      boolean result = stream.verify(signatureCopy);
      VERIFY_CACHE.put(key, stream);
      if (result) {
        return true;
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.