Examples of sign()


Examples of java.security.Signature.sign()

        byte[] message = new byte[] { (byte)'a', (byte)'b', (byte)'c' };

        sgr.update(message);

        byte[]  sigBytes = sgr.sign();

        sgr.initVerify(vKey);

        sgr.update(message);
View Full Code Here

Examples of java.security.Signature.sign()

        s.initSign(sKey);

        s.update(data);

        byte[]  sigBytes = s.sign();

        s = Signature.getInstance("GOST3410", "BC");

        s.initVerify(vKey);
View Full Code Here

Examples of java.security.Signature.sign()

        s.initSign(sKey);

        s.update(data);

        sigBytes = s.sign();

        s = Signature.getInstance("GOST3410", "BC");

        s.initVerify(vKey);
View Full Code Here

Examples of javax.xml.crypto.dsig.XMLSignature.sign()

        (si, ki, Collections.singletonList(obj), null, null);

        DOMSignContext dsc = new DOMSignContext(signingKey, doc);
        dsc.setDefaultNamespacePrefix("dsig");

        sig.sign(dsc);
        TestUtils.validateSecurityOrEncryptionElement(doc.getDocumentElement());
       
        // XMLUtils.outputDOM(doc.getDocumentElement(), System.out);

        DOMValidateContext dvc = new DOMValidateContext
View Full Code Here

Examples of javax.xml.crypto.dsig.XMLSignature.sign()

        (si, ki, Collections.singletonList(obj), null, null);

        DOMSignContext dsc = new DOMSignContext(signingKey, doc);
        dsc.setDefaultNamespacePrefix("dsig");

        sig.sign(dsc);
        TestUtils.validateSecurityOrEncryptionElement(doc.getDocumentElement());
       
        // XMLUtils.outputDOM(doc.getDocumentElement(), System.out);

        DOMValidateContext dvc = new DOMValidateContext
View Full Code Here

Examples of javax.xml.crypto.dsig.XMLSignature.sign()

            KeyValue kv = kif.newKeyValue(publicKey);
            KeyInfo ki = kif.newKeyInfo(Collections.singletonList(kv));

            XMLSignature signature = fac.newXMLSignature(si, ki);

            signature.sign(dsc);
        } catch (XMLSignatureException e) {
            throw new RuntimeException(e);
        } catch (NoSuchAlgorithmException e) {
            throw new RuntimeException(e);
        } catch (InvalidAlgorithmParameterException e) {
View Full Code Here

Examples of javax.xml.crypto.dsig.XMLSignature.sign()

                DOMSignContext dsc = createAndConfigureSignContext(parent, keySelector);

                XMLSignature signature = fac.newXMLSignature(si, keyInfo, objects, signatureId, null);
                // generate the signature
                signature.sign(dsc);
            }

            return XmlSignatureHelper.getDocument(lastParent);

        } catch (XMLSignatureException se) {
View Full Code Here

Examples of mykeynote.keynote.KeyNoteCL.sign()

    File outputFile = new File(base, "test-assertion1-signed.out");
    File okFile = new File(base, "test-assertion1-signed.ok");
    File keyFile = new File(base, "test.key.pem");
    String i = "100";
    try {
      cl.sign(i, report, fileToSign, keyFile,outputFile);
    } catch (FileNotFoundException e) {
      assertNull(e);
    } catch (InterruptedException e) {
      assertNull(e);
    } catch (IOException e) {
View Full Code Here

Examples of net.fortytwo.ripple.model.NumericValue.sign()

        NumericValue a, result;

        a = mc.toNumericValue(stack.getFirst());
        stack = stack.getRest();

        result = mc.valueOf(a.sign());

        solutions.put(
                stack.push(result));
    }
}
View Full Code Here

Examples of net.oauth.OAuthMessage.sign()

    OAuthConsumer consumer = new OAuthConsumer("", props
        .getProperty("consumerKey"), props
        .getProperty("consumerSecret"), provider);
    OAuthAccessor accessor = new OAuthAccessor(consumer);
    accessor.tokenSecret = props.getProperty("tokenSecret");
    message.sign(accessor);

    return message.getAuthorizationHeader(resource);
  }

  public void request() throws Exception {
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.