din.on(false); Signature signature = new Signature(_sigType); signature.readBytes(in);
/** * This method allows to compute the digest of the TBSCertList * * @param s * an initialized DigestInputStream * @throws IOException */ public void processDigest(DigestInputStream s) throws IOException { // We don't digest the beginning (not part of TBS) s.on(false); // Skip CertificateList Sequence info consumeTagIntro(s); // Start to digest TBS s.on(true); // Strip the tag and length of the TBSCertList sequence int tag = DERUtil.readTag(s); DERUtil.readTagNumber(s, tag); int tbsLength = DERUtil.readLength(s); // Read TBSCertList Content readNbBytes(s, tbsLength); // End digest TBS s.on(false); }
DigestInputStream digestInputStream = new DigestInputStream(inputStream, digest); dis = new DataInputStream(digestInputStream); digestInputStream.on(false); String magic = "CHECKPOINTS 1"; byte[] header = new byte[magic.length()]; digestInputStream.on(true); int numCheckpoints = dis.readInt(); checkState(numCheckpoints > 0);
DigestInputStream digestInputStream = new DigestInputStream(inputStream, digest); dis = new DataInputStream(digestInputStream); digestInputStream.on(false); byte[] header = new byte[BINARY_MAGIC.length()]; dis.readFully(header); digestInputStream.on(true); int numCheckpoints = dis.readInt(); checkState(numCheckpoints > 0);
DigestInputStream digestInputStream = new DigestInputStream(inputStream, digest); dis = new DataInputStream(digestInputStream); digestInputStream.on(false); byte[] header = new byte[BINARY_MAGIC.length()]; dis.readFully(header); digestInputStream.on(true); int numCheckpoints = dis.readInt(); checkState(numCheckpoints > 0);
DigestInputStream digestInputStream = new DigestInputStream(inputStream, digest); dis = new DataInputStream(digestInputStream); digestInputStream.on(false); byte[] header = new byte[BINARY_MAGIC.length()]; dis.readFully(header); digestInputStream.on(true); int numCheckpoints = dis.readInt(); checkState(numCheckpoints > 0);
DigestInputStream digestInputStream = new DigestInputStream(inputStream, digest); dis = new DataInputStream(digestInputStream); digestInputStream.on(false); byte[] header = new byte[BINARY_MAGIC.length()]; dis.readFully(header); digestInputStream.on(true); int numCheckpoints = dis.readInt(); checkState(numCheckpoints > 0);
DigestInputStream digestInputStream = new DigestInputStream(inputStream, digest); dis = new DataInputStream(digestInputStream); digestInputStream.on(false); byte[] header = new byte[BINARY_MAGIC.length()]; dis.readFully(header); digestInputStream.on(true); int numCheckpoints = dis.readInt(); checkState(numCheckpoints > 0);