Package org.keyczar.interfaces

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


    }

    ByteBuffer header = ByteBuffer.allocate(HEADER_SIZE);
    signingKey.copyHeader(header);
    header.rewind();
    stream.initSign();

    // Sign the header and write it to the output buffer
    output.mark();
    output.put(header);
View Full Code Here


    int spaceNeeded = digestSize();
    if (output.capacity() < spaceNeeded) {
      throw new ShortBufferException(output.capacity(), spaceNeeded);
    }

    stream.initSign();
    // 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
View Full Code Here

    if (cryptStream == null) {
      cryptStream = (EncryptingStream) encryptingKey.getStream();
    }
    // Initialize the signing stream
    SigningStream signStream = cryptStream.getSigningStream();
    signStream.initSign();

    // Write the key header
    output.mark();
    ByteBuffer outputToSign = output.asReadOnlyBuffer();
    encryptingKey.copyHeader(output);
View Full Code Here

    }

    ByteBuffer header = ByteBuffer.allocate(HEADER_SIZE);
    signingKey.copyHeader(header);
    header.rewind();
    stream.initSign();

    // Sign the header and write it to the output buffer
    output.mark();
    output.put(header);
View Full Code Here

    if (stream == null) {
      // If not, allocate a new stream object.
      stream = (SigningStream) signingKey.getStream();
    }

    stream.initSign();
    // Attached signature signs:
    // [blob | hidden.length | hidden | format] or [blob | 0 | format]
    byte[] hiddenPlusLength = Util.fromInt(0);
    if (hidden.length > 0) {
      hiddenPlusLength = Util.lenPrefix(hidden);
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.