Examples of sign()


Examples of org.jose4j.jws.JsonWebSignature.sign()

        jws.setPayload(jwsPayload);
        jws.setAlgorithmHeaderValue(AlgorithmIdentifiers.HMAC_SHA256);
        jws.setKeyIdHeaderValue(jwk.getKeyId());
        jws.setKey(jwk.getKey());
        // To create a detached signature, sign and then concatenate the encoded header, two dots "..", and the encoded signature
        jws.sign();
        String encodedHeader = jws.getHeaders().getEncodedHeader();
        String encodedSignature = jws.getEncodedSignature();
        String reproducedDetachedCs = encodedHeader + ".." + encodedSignature;
        assertThat(detachedCs, is(equalTo(reproducedDetachedCs)));
        assertThat(encodedJwsPayload, is(equalTo(jws.getEncodedPayload())));
View Full Code Here

Examples of org.kapott.hbci.passport.HBCIPassportInternal.sign()

                         * Currently the only exception is PKCS#1-10, where an extra
                         * round of hashing must be executed before applying the
                         * signature process */
                        String hashdata=collectHashData(idx);
                        byte[] hashresult=passport.hash(hashdata.getBytes(Comm.ENCODING));
                        byte[] signature=passport.sign(hashresult);

                        if (passport.needUserSig()) {
                            String pintan=new String(signature,Comm.ENCODING);
                            int pos=pintan.indexOf("|");
                           
View Full Code Here

Examples of org.keyczar.Signer.sign()

  public byte[] generate(String algorithm, Map<String, String> generateParams)
      throws KeyczarException{
    Signer signer = new Signer(
        getReader(algorithm, generateParams.get("cryptedKeySet"), ""));
    if (generateParams.get("encoding").equals("encoded")) {
      String signature = signer.sign(testData);
      return signature.getBytes();
    } else if (generateParams.get("encoding").equals("unencoded")) {
      byte[] signature = signer.sign(testData.getBytes());
      return signature;
    } else {
View Full Code Here

Examples of org.keyczar.UnversionedSigner.sign()

  public byte[] generate(String algorithm, Map<String, String> generateParams)
      throws KeyczarException{
    UnversionedSigner signer = new UnversionedSigner(
        getReader(algorithm, generateParams.get("cryptedKeySet"), ""));
    if (generateParams.get("encoding").equals("encoded")) {
      String signature = signer.sign(testData);
      return signature.getBytes();
    } else if (generateParams.get("encoding").equals("unencoded")) {
      byte[] signature = signer.sign(testData.getBytes());
      return signature;
    } else {
View Full Code Here

Examples of org.keyczar.interfaces.SigningStream.sign()

    stream.updateSign(input);
    // Sign the version byte
    stream.updateSign(ByteBuffer.wrap(FORMAT_BYTES));

    // Write the signature to the output
    stream.sign(output);
    output.limit(output.position());
    SIGN_QUEUE.add(stream);
  }

  /**
 
View Full Code Here

Examples of org.openid4java.association.Association.sign()

        try
        {
            returnTo += "openid.rpnonce=" + URLEncoder.encode(nonce, "UTF-8");

            returnTo += "&openid.rpsig=" +
                    URLEncoder.encode(privateAssoc.sign(returnTo),
                            "UTF-8");

            _log.info("Inserted consumer nonce: " + nonce);

            if (DEBUG) _log.debug("return_to:" + returnTo);
View Full Code Here

Examples of org.openid4java.association.Association.sign()

                if (_signExtensions != null)
                    response.setSignExtensions(_signExtensions);

                if (signNow)
                    response.setSignature(assoc.sign(response.getSignedText()));

                _log.info("Returning positive assertion for " +
                          response.getReturnTo());

                return response;
View Full Code Here

Examples of org.openid4java.association.Association.sign()

            assoc = _privateAssociations.load(handle);

        if (assoc == null) throw new ServerException(
                "No association found for handle: " + handle);

        authSuccess.setSignature(assoc.sign(authSuccess.getSignedText()));
    }

    /**
     * Responds to a verification request from the consumer.
     *
 
View Full Code Here

Examples of org.openid4java.server.ServerManager.sign()

                            .getProfileName());
                    if (messageExtension != null) {
                        message.addExtension(messageExtension);
                        AuthSuccess authSuccess = (AuthSuccess) message;
                        authSuccess.addSignExtension((String) alias);
                        manager.sign(authSuccess);
                    }
                }
            }

            // We only have SReg extensions.
View Full Code Here

Examples of org.openrdf.sail.federation.signatures.BNodeSigner.sign()

    vf = new ValueFactoryImpl(bf, uf, lf);

    this.members = new ArrayList<SignedConnection>(members.size());
    for (RepositoryConnection member : members) {
      BNodeSigner signer = new BNodeSigner(bf, member.getValueFactory());
      this.members.add(signer.sign(member));
    }
  }

  public ValueFactory getValueFactory() {
    return vf;
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.