@Test public void testNormalize() throws Exception { assertEquals("140f86aae51ab9e1cda9b4254fe98a74eb54c1a1", new SHA1ChecksumCompute().compute(IOUtils.toInputStream("input", Charset.defaultCharset()), new TransferStatus()).hash); assertEquals("140f86aae51ab9e1cda9b4254fe98a74eb54c1a1", new SHA1ChecksumCompute().compute(IOUtils.toInputStream("_input", Charset.defaultCharset()), new TransferStatus().skip(1)).hash); assertEquals("140f86aae51ab9e1cda9b4254fe98a74eb54c1a1", new SHA1ChecksumCompute().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.sha1, Hex.encodeHexString(this.digest("SHA-1", this.normalize(in, status)))); }
SHA1ChecksumCompute extends AbstractChecksumCompute { @Override public Checksum compute(final InputStream in, final TransferStatus status) throws ChecksumException { return new Checksum(HashAlgorithm.sha1, Hex.encodeHexString(this.digest("SHA-1", this.normalize(in, status)))); } }
SHA1ChecksumCompute extends AbstractChecksumCompute { @Override public Checksum compute(final InputStream in, final TransferStatus status) throws ChecksumException { return new Checksum(HashAlgorithm.sha1, Hex.encodeHexString(this.digest("SHA-1", this.normalize(in, status)))); }  }
SHA1ChecksumCompute extends AbstractChecksumCompute { @Override public Checksum compute(final InputStream in, final TransferStatus status) throws ChecksumException { return new Checksum(HashAlgorithm.sha1, Hex.encodeHexString(this.digest("SHA-1", this.normalize(in, status)))); }  @Override Checksum compute(final InputStream in, final TransferStatus status); }
SHA1ChecksumCompute extends AbstractChecksumCompute { @Override public Checksum compute(final InputStream in, final TransferStatus status) throws ChecksumException { return new Checksum(HashAlgorithm.sha1, Hex.encodeHexString(this.digest("SHA-1", this.normalize(in, status)))); }  @Override Checksum compute(final InputStream in, final TransferStatus status);  }