Examples of verify()


Examples of de.anomic.tools.SignatureOutputStream.verify()

                SignatureOutputStream verifyOutput = null;
                try {
                    verifyOutput = new SignatureOutputStream(new FileOutputStream(download), CryptoLib.signAlgorithm, this.publicKey);
                    client.writeTo(new BufferedOutputStream(verifyOutput));

                    if (!verifyOutput.verify(signatureBytes)) throw new IOException("Bad Signature!");
                } catch (final NoSuchAlgorithmException e) {
                    throw new IOException("No such algorithm");
                } catch (final SignatureException e) {
                    throw new IOException("Signature exception");
                } finally {
View Full Code Here

Examples of gnu.java.security.sig.ISignature.verify()

    map.put(BaseSignature.VERIFIER_KEY, pubK);
    bob.setupVerify(map);
    bob.update(MESSAGE, 0, MESSAGE.length);

    harness.check(bob.verify(decodedSignature));
  }
}
View Full Code Here

Examples of gnu.java.security.sig.dss.DSSSignature.verify()

    map.put(BaseSignature.VERIFIER_KEY, publicK);
    bob.setupVerify(map);
    bob.update(message, 0, message.length);

    harness.check(bob.verify(signature), "instance methods");

    IMessageDigest sha = new Sha160();
    sha.update(message, 0, message.length);
    byte[] hash = sha.digest();
    BigInteger[] rs = DSSSignature.sign(privateK, hash);
View Full Code Here

Examples of gnu.testlet.gnu.javax.swing.text.html.parser.support.Parser.Parser_Test.verify()

    v.verify("<pre>\r\n   abba   </pre>",
             "<html><head></head><body><pre>20 20 20 61'a 62'b 62'b 61'a 20 " +
             "20 20 </pre></body></html>"
            );

    v.verify("<pre>\r\n\r\n   abba   \r\n</pre>",
             "<html><head></head><body><pre>a 20 20 20 61'a 62'b 62'b 61'a 20 20" +
             " 20 </pre></body></html>"
            );

    v.verify("<pre> \r ab  \t \r \n  ba   </pre>",
View Full Code Here

Examples of gov.nasa.arc.mct.fastplot.view.TimeSpanTextField.DurationVerifier.verify()

  public void testVerifier() {
    TimeSpanTextField field = new TimeSpanTextField(formatter);
    DurationVerifier verifier = field.new DurationVerifier();

    field.setText("000/08:22:51");
    Assert.assertTrue(verifier.verify(field));
    field.setText("020/00:59:59");
    Assert.assertTrue(verifier.verify(field));
    field.setText("365/23:59:00");
    Assert.assertTrue(verifier.verify(field));
    field.setText("365/24:59:00");
View Full Code Here

Examples of gov.nasa.arc.mct.fastplot.view.TimeTextField.TimeVerifier.verify()

    field.setYear(2012);
   
    TimeVerifier verifier = field.new TimeVerifier();
   
    field.setText("000/08:22:51");
    Assert.assertFalse(verifier.verify(field));
    field.setText("001/08:22:51");
    Assert.assertTrue(verifier.verify(field));
    field.setText("020/00:59:59");
    Assert.assertTrue(verifier.verify(field));
    field.setText("365/23:59:00");
View Full Code Here

Examples of iaik.x509.NetscapeCertRequest.verify()

  } catch (CodingException e) {
      System.out.println("OOPS " + e);
      e.printStackTrace();
  }
  try {
      nc.verify();
  } catch (java.security.SignatureException e) {
      System.out.println("OOPS " + e);
      e.printStackTrace();
  }
  System.out.println("Got cert req: " + nc);
View Full Code Here

Examples of io.undertow.security.idm.IdentityManager.verify()

        NegotiationContext negContext = connection.getAttachment(NegotiationContext.ATTACHMENT_KEY);
        if (negContext != null) {
            exchange.putAttachment(NegotiationContext.ATTACHMENT_KEY, negContext);
            if (negContext.isEstablished()) {
                IdentityManager identityManager = securityContext.getIdentityManager();
                final Account account = identityManager.verify(new GSSContextCredential(negContext.getGssContext()));
                if (account != null) {
                    securityContext.authenticationComplete(account, name);
                    return AuthenticationMechanismOutcome.AUTHENTICATED;
                } else {
                    return AuthenticationMechanismOutcome.NOT_AUTHENTICATED;
View Full Code Here

Examples of ivory.regression.GroundTruth.verify()

    for (String model : models) {
      System.err.println("Verifying results of model \"" + model + "\"");

      GroundTruth groundTruth = g.get(model);
      Map<String, Accumulator[]> result = results.get(model);
      groundTruth.verify(result, mapping, qrels);

      System.err.println("Done!");
    }
  }
View Full Code Here

Examples of java.security.Signature.verify()

    }

    // Check signature
    boolean trusted = false;
    try {
      trusted = signature.verify(identity.getSignature());
    } catch (SignatureException e) {
      if (logger.isLoggable(BasicLevel.ERROR))
        logger.log(BasicLevel.ERROR, "EXCEPTION:: validate", e);
      throw new Exception("The signature found in the identity '" + this + "' is invalid:" + e.getMessage());
    }
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.