computeMessageDigest
Compute

Description

Computes the message digests of one or more files.

Usage

computeMessageDigest(files, algorithm)
listMessageDigestAlgorithms()

Arguments

files character vector specifying the file names to compute the message digests of. NAs or NULL are not allowed.
algorithm character value specifying the name of the message digest algorithm to use. If the specified algorithm is unknown, an error will be thrown.

Details

These functions use OpenSSL to compute message digests of files on disk.
Value
computeMessageDigest returns a character vector containing the string representations of the calculated message digests. The names of this vector are the given filenames. If the filename does not exist, is not a regular file, or the function encounters any failures during computation, NA will be given as a result for that filename.
listMessageDigestAlgorithms returns a character vector containing the names of the supported message digest algorithms.
See Also
md5sum
Examples
## list the supported message digest algorithms
listMessageDigestAlgorithms()

## Not run: ## equivalent to tools::md5sum(...) computeMessageDigest(c("file1.txt", "file2.bin", "file3.doc"), "MD5")

## SHA-1 computeMessageDigest("file4.zip", "SHA1") ## End(Not run)

Package terrUtils version 4.0.0-28
Package Index