Class DigestUtilsKt
-
- All Implemented Interfaces:
public final class DigestUtilsKt
-
-
Method Summary
Modifier and Type Method Description final static ByteArraycalculateDigest(@WillNotClose() ReadableByteChannel channel, String algorithm, Integer bufferSize)Calculates a digest over the contents of a ReadableByteChannel. final static ByteArraycalculateDigest(Path $self, String algorithm, Integer bufferSize)Calculates a digest over the contents of a file. final static ByteArraycalculateDigest(File $self, String algorithm, Integer bufferSize)Calculates a digest over the contents of a file. final static StringcalculateDigestHex(Path $self, String algorithm, Integer bufferSize)Calculates a digest over the contents of a file, and encodes it as a lower-case hexadecimal string. final static StringcalculateDigestHex(File $self, String algorithm, Integer bufferSize)Calculates a digest over the contents of a file, and encodes it as a lower-case hexadecimal string. -
-
Method Detail
-
calculateDigest
final static ByteArray calculateDigest(@WillNotClose() ReadableByteChannel channel, String algorithm, Integer bufferSize)
Calculates a digest over the contents of a ReadableByteChannel.
- Parameters:
channel- the ReadableByteChannel that contains the data.algorithm- the digest algorithm, e.g.bufferSize- the buffer size- Returns:
the digest as an array of bytes
-
calculateDigest
final static ByteArray calculateDigest(Path $self, String algorithm, Integer bufferSize)
Calculates a digest over the contents of a file.
- Parameters:
algorithm- the digest algorithm, e.g.bufferSize- the buffer size- Returns:
the digest as an array of bytes
-
calculateDigest
final static ByteArray calculateDigest(File $self, String algorithm, Integer bufferSize)
Calculates a digest over the contents of a file.
- Parameters:
algorithm- the digest algorithm, e.g.bufferSize- the buffer size- Returns:
the digest as an array of bytes
-
calculateDigestHex
final static String calculateDigestHex(Path $self, String algorithm, Integer bufferSize)
Calculates a digest over the contents of a file, and encodes it as a lower-case hexadecimal string.
- Parameters:
algorithm- the digest algorithm, e.g.bufferSize- the buffer size- Returns:
the digest as a hex-encoded string
-
calculateDigestHex
final static String calculateDigestHex(File $self, String algorithm, Integer bufferSize)
Calculates a digest over the contents of a file, and encodes it as a lower-case hexadecimal string.
- Parameters:
algorithm- the digest algorithm, e.g.bufferSize- the buffer size- Returns:
the digest as a hex-encoded string
-
-
-
-