Examples of sign()


Examples of net.schmizz.sshj.signature.Signature.sign()

        sigger.init(null, key);
        sigger.update(new Buffer.PlainBuffer()
                              .putString(params.getTransport().getSessionID())
                              .putBuffer(reqBuf) // & rest of the data for sig
                              .getCompactData());
        reqBuf.putSignature(kt, sigger.sign());
        return reqBuf;
    }

}
View Full Code Here

Examples of net.sf.nic.FileSigner.sign()

    // Signing the installer.
    FileSigner signer = getSigner(installer, false);
    if (signer != null) {
      project.logInfo("Signing the installer '%s'", installer);
      signer.sign(installer);
    } else
      project.logWarning("No signers available to sign '%s'", installer);
  }

  /**
 
View Full Code Here

Examples of net.tomp2p.connection.SignatureFactory.sign()

    FuturePut futurePut = p1.put(lKey).setDomainKey(dKey).setData(cKey, data).setVersionKey(vKey).start();
    futurePut.awaitUninterruptibly();
    Assert.assertTrue(futurePut.isSuccess());

    // create signature with keys 1 having the data object
    byte[] signature1 = factory.sign(keyPair1.getPrivate(), data.buffer()).encode();

    // decrypt signature to get hash of the object
    Cipher rsa = Cipher.getInstance("RSA");
    rsa.init(Cipher.DECRYPT_MODE, keyPair1.getPublic());
    byte[] hash = rsa.doFinal(signature1);
View Full Code Here

Examples of oauth.signpost.OAuthConsumer.sign()

  private byte[] doRequest(HttpRequestBase request, TokenHolder tokenHolder, HttpParameters oauthParams) {
    try {
      OAuthConsumer consumer = tokenHolder.createConsumer();
      consumer.setAdditionalParameters(oauthParams);
      consumer.sign(request);
      HttpResponse response = client.execute(request);
      int statusCode = response.getStatusLine().getStatusCode();
      HttpEntity entity = response.getEntity();
      byte[] content = entity != null ? readBytes(entity.getContent()) : new byte[0];
      switch (statusCode) {
View Full Code Here

Examples of oauth.signpost.basic.DefaultOAuthConsumer.sign()

      consumer.setMessageSigner(new HmacSha1MessageSigner());
      consumer.setSendEmptyTokens(true);

      // sign the request (consumer is a Signpost DefaultOAuthConsumer)
      try {
        consumer.sign(request);
      } catch (Exception e) {
        throw new RuntimeException("OAuth exception: " + e.getMessage());
      }
      request.connect();
            final int httpResponseCode = request.getResponseCode();
View Full Code Here

Examples of oauth.signpost.commonshttp.CommonsHttpOAuthConsumer.sign()

        StringEntity body = new StringEntity("city=hamburg&label="
                + URLEncoder.encode("Send via Signpost!", "UTF-8"));
        body.setContentType("application/x-www-form-urlencoded");
        request.setEntity(body);

        consumer.sign(request);

        System.out.println("Sending update request to Fire Eagle...");

        HttpClient httpClient = new DefaultHttpClient();
        HttpResponse response = httpClient.execute(request);
View Full Code Here

Examples of oauth.signpost.jetty.JettyOAuthConsumer.sign()

    ex.setURL(APICall.getStreamingQuote(ResponseFormat.XML) + getParameters(symbols));

    // sign the request
    try
    {
      consumer.sign(ex);
      client.send(ex);
    }
    catch (IOException | OAuthMessageSignerException | OAuthExpectationFailedException | OAuthCommunicationException e)
    {
      throw new ModelException("Sent Exchange to Client", e);
View Full Code Here

Examples of org.apache.abdera.security.Signature.sign()

    SignatureOptions options = sig.getDefaultSignatureOptions();   
    options.setCertificate(cert);
    options.setSigningKey(signingKey)

    // Sign the entry
    entry = sig.sign(entry, options);
    assertNotNull(
      entry.getFirstChild(
        new QName(
          "http://www.w3.org/2000/09/xmldsig#",
          "Signature")));
View Full Code Here

Examples of org.apache.abdera.security.Signature.sign()

    SignatureOptions options = sig.getDefaultSignatureOptions();   
    options.setCertificate(cert);
    options.setSigningKey(signingKey);

    // Sign the entry
    entry = sig.sign(entry, options);
    assertNotNull(
      entry.getFirstChild(
        new QName(
          "http://www.w3.org/2000/09/xmldsig#",
          "Signature")));
View Full Code Here

Examples of org.apache.abdera.security.Signature.sign()

    Signature sig = security.getSignature();
    SignatureOptions options = sig.getDefaultSignatureOptions();   
    options.setCertificate(cert);
    options.setSigningKey(signingKey);
    Element element = doc.getRoot();
    element = sig.sign(element, options);
    return element.getDocument();
  }
 
  private Document<Element> getDocument(BufferingResponseWrapper wrapper) {
    Reader rdr = wrapper.getReader();
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.