@Test public void testNormalize() throws Exception { assertEquals("c96c6d5be8d08a12e7b5cdc1b207fa6b2430974c86803d8891675e76fd992c20", new SHA256ChecksumCompute().compute(IOUtils.toInputStream("input", Charset.defaultCharset()), new TransferStatus()).hash); assertEquals("c96c6d5be8d08a12e7b5cdc1b207fa6b2430974c86803d8891675e76fd992c20", new SHA256ChecksumCompute().compute(IOUtils.toInputStream("_input", Charset.defaultCharset()), new TransferStatus().skip(1)).hash); assertEquals("c96c6d5be8d08a12e7b5cdc1b207fa6b2430974c86803d8891675e76fd992c20", new SHA256ChecksumCompute().compute(IOUtils.toInputStream("_input_", Charset.defaultCharset()), new TransferStatus().skip(1).length(5)).hash); }
@Override public Checksum compute(final InputStream in, final TransferStatus status) throws ChecksumException { return new Checksum(HashAlgorithm.sha256, Hex.encodeHexString(this.digest("SHA-256", this.normalize(in, status)))); }
SHA256ChecksumCompute extends AbstractChecksumCompute { @Override public Checksum compute(final InputStream in, final TransferStatus status) throws ChecksumException { return new Checksum(HashAlgorithm.sha256, Hex.encodeHexString(this.digest("SHA-256", this.normalize(in, status)))); } }
SHA256ChecksumCompute extends AbstractChecksumCompute { @Override public Checksum compute(final InputStream in, final TransferStatus status) throws ChecksumException { return new Checksum(HashAlgorithm.sha256, Hex.encodeHexString(this.digest("SHA-256", this.normalize(in, status)))); }  }
SHA256ChecksumCompute extends AbstractChecksumCompute { @Override public Checksum compute(final InputStream in, final TransferStatus status) throws ChecksumException { return new Checksum(HashAlgorithm.sha256, Hex.encodeHexString(this.digest("SHA-256", this.normalize(in, status)))); }  @Override Checksum compute(final InputStream in, final TransferStatus status); }
SHA256ChecksumCompute extends AbstractChecksumCompute { @Override public Checksum compute(final InputStream in, final TransferStatus status) throws ChecksumException { return new Checksum(HashAlgorithm.sha256, Hex.encodeHexString(this.digest("SHA-256", this.normalize(in, status)))); }  @Override Checksum compute(final InputStream in, final TransferStatus status);  }