Package org.keyczar.interfaces

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


    // Sign the header and write it to the output buffer
    output.mark();
    // Sign the input data
    stream.updateSign(input);
    // Write the signature to the output
    stream.sign(output);
    output.limit(output.position());
    SIGN_QUEUE.add(stream);
  }

  /**
 
View Full Code Here

    // Set the limit on the output to sign
    outputToSign.limit(output.position());
    signStream.updateSign(outputToSign);
    // Sign the final block of ciphertext output
    signStream.sign(output);
    ENCRYPT_QUEUE.add(cryptStream);
  }

  /**
   * Encrypt a String and return a web-safe Base64 encoded ciphertext.
View Full Code Here

    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

    // now get signature output
    ByteBuffer output = ByteBuffer.allocate(stream.digestSize());
    output.mark();

    stream.sign(output);
    output.limit(output.position());

    // Attached signature format is:
    // [Format number | 4 bytes of key hash | blob size | blob | raw signature]
    byte[] signature =
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.