Examples of sign()


Examples of ch.ethz.iks.slp.ServiceURL.sign()

   */
  void sign(final String spiStr) throws ServiceLocationException {
    List spiList = stringToList(spiStr, ",");
    for (Iterator urlIter = urlList.iterator(); urlIter.hasNext();) {
      ServiceURL url = (ServiceURL) urlIter.next();
      url.sign(spiList);
    }
  }

  /**
   * verify the ServiceReply.
View Full Code Here

Examples of cli_fmw.delegate.collaborator.CollaboratorLocalAbstract.sign()

        CollaboratorLocalAbstract collaboratorLocal = UserInfoAbstract.get().getCollaboratorLocal();
        for (AuditDetails auditDetails : list) {
            try {
                byte[] bytes = auditDetails.value.getBytes();
                t2 = new Date().getTime();
                auditDetails.sign = collaboratorLocal.sign(bytes);
                System.out.println("SIGN AUDIT " + auditDetails.id + " IN " + (new Date().getTime() - t2) + " ms");
            } catch (ClipsException ex) {
                ex.printStackTrace();
            }
        }
View Full Code Here

Examples of com.amazonaws.auth.AWS4Signer.sign()

    request.setResourcePath(resourcePath);
   
    AWS4Signer aws4Signer=new AWS4Signer();
    String host = uri.getHost();
    aws4Signer.setServiceName(host);
    aws4Signer.sign(request, awsCredentials);
   
    //set headers for real request
    for (Entry <String, String>entry:request.getHeaders().entrySet()){
      conn.setRequestProperty(entry.getKey(),entry.getValue())
    }
View Full Code Here

Examples of com.amazonaws.auth.Signer.sign()

                if (signer == null)
                    signer = executionContext.getSignerByURI(request.getEndpoint());
                if (signer != null && credentials != null) {
                    awsRequestMetrics.startEvent(Field.RequestSigningTime);
                    try {
                        signer.sign(request, credentials);
                    } finally {
                        awsRequestMetrics.endEvent(Field.RequestSigningTime);
                    }
                }
View Full Code Here

Examples of com.bitsofproof.supernode.common.ECKeyPair.sign()

    {
      JSONObject test = tests.getJSONObject (i);
      ECKeyPair key = ECKeyPair.parseWIF (test.getString ("key"));
      byte[] message = test.getString ("message").getBytes ();
      byte[] expectedSignature = ByteUtils.fromHex (test.getString ("expectedSignature"));
      byte[] signature = key.sign (message);
      assertTrue (Arrays.equals (expectedSignature, signature));
    }
  }
}
View Full Code Here

Examples of com.bitsofproof.supernode.common.Key.sign()

        Key key = getKeyForAddress (address);
        if ( key == null )
        {
          throw new ValidationException ("Have no key to spend this output");
        }
        byte[] sig = key.sign (hashTransaction (transaction, j, ScriptFormat.SIGHASH_ALL, s.getScript ()));
        byte[] sigPlusType = new byte[sig.length + 1];
        System.arraycopy (sig, 0, sigPlusType, 0, sig.length);
        sigPlusType[sigPlusType.length - 1] = (byte) (ScriptFormat.SIGHASH_ALL & 0xff);
        sw.writeData (sigPlusType);
        sw.writeData (key.getPublic ());
View Full Code Here

Examples of com.nimbusds.jose.JWSObject.sign()

    // Create HMAC signer
    JWSSigner signer = new MACSigner(SHARED_KEY.getBytes());

    try {
      jwsObject.sign(signer);
    } catch(com.nimbusds.jose.JOSEException e) {
      System.err.println("Error signing JWT: " + e.getMessage());
      return;
    }
View Full Code Here

Examples of com.nimbusds.jose.JWSSigner.sign()

    JWSHeader header = JWSHeader.parse(b64header);

    JWSSigner signer = new MACSigner(sharedSecret);

    Base64URL b64sigComputed = signer.sign(header, signable);

    assertEquals("Signature check", b64sig, b64sigComputed);
  }

View Full Code Here

Examples of com.nimbusds.jwt.SignedJWT.sign()

    Secret secret = new Secret();

    SignedJWT jwt = new SignedJWT(new JWSHeader(JWSAlgorithm.HS256), claimsSet);

    jwt.sign(new MACSigner(secret.getValueBytes()));

    UserInfoSuccessResponse response = new UserInfoSuccessResponse(jwt);

    assertEquals(jwt, response.getUserInfoJWT());
    assertEquals("application/jwt; charset=UTF-8", response.getContentType().toString());
View Full Code Here

Examples of com.sun.org.apache.xml.internal.security.algorithms.SignatureAlgorithm.sign()

                //Imposible
            }
            // get the canonicalized bytes from SignedInfo
            si.signInOctectStream(so);

            byte jcebytes[] = sa.sign();

            // set them on the SignateValue element
            this.setSignatureValueElement(jcebytes);
         }
      } catch (CanonicalizationException ex) {
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.