klyn.cryptography.MessageDigest.digestFile
method

    public digestFile(path as Object) as Byte[] throws CryptoException:

Description

Hashes a file from a `String` or `Path` value.

Parameters

Parameter | Description
--- | ---
`path` | File path as `String` or `Path`.

Returns

Raw digest bytes.

Throws

- CryptoException when the path or algorithm is invalid.

Example

    import klyn.cryptography

    md = SHA256()
    digest = md.digestFile("README.md")
    print(digest.size)