klyn.cryptography.MessageDigest.digestFileInfo
method
public digestFileInfo(path as Object) as Digest throws CryptoException:
Description
Hashes a file and returns a structured digest view.
import klyn.cryptography

md = SHA256()
digest = md.digestFileInfo("README.md")
print(digest.hex)
Parameters
  • path File path as `String` or `Path`.
Returns
Structured digest result.
Throws
  • CryptoException when the path or algorithm is invalid. ```klyn import klyn.cryptography md = SHA256() digest = md.digestFileInfo("README.md") print(digest.hex) ```