Package org.keyczar.interfaces

Examples of org.keyczar.interfaces.VerifyingStream.initVerify()


      ByteBuffer signatureCopy = signature.duplicate();
      VerifyingStream stream = VERIFY_CACHE.get(key);
      if (stream == null) {
        stream = (VerifyingStream) key.getStream();
      }
      stream.initVerify();
      stream.updateVerify(dataCopy);
      boolean result = stream.verify(signatureCopy);
      VERIFY_CACHE.put(key, stream);
      if (result) {
        return true;
View Full Code Here


    cryptStream.initDecrypt(inputCopy);

    // Verify the header and IV if any
    ByteBuffer headerAndIvToVerify = input.asReadOnlyBuffer();
    headerAndIvToVerify.limit(inputCopy.position());
    verifyStream.initVerify();
    verifyStream.updateVerify(headerAndIvToVerify);

    output.mark();
    // This will process large input in chunks, rather than all at once. This
    // avoids making two passes through memory.
View Full Code Here

    if (stream == null) {
      stream = (VerifyingStream) key.getStream();
    }
    boolean foundValidSignature;
    try {
      stream.initVerify();
      stream.updateVerify(data.duplicate());
      foundValidSignature = stream.verify(signature.duplicate());
      VERIFY_CACHE.put(key, stream);
    } catch (KeyczarException e) {
      // Crypto library can throw errors for invalid keys
View Full Code Here

    VerifyingStream stream = VERIFY_CACHE.get(key);
    if (stream == null) {
      stream = (VerifyingStream) key.getStream();
    }
    stream.initVerify();
    if (hidden != null) {
      stream.updateVerify(hidden);
    }
    stream.updateVerify(data);
    // The signed data is terminated with the current Keyczar format
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.