computeMessageDigest(files, algorithm) computeMessageDigestFromBytes(bytes, algorithm) listMessageDigestAlgorithms()
files | a character vector specifying the file names for which to compute the message digests. NAs or NULL are not allowed. |
bytes | a raw vector of bytes that are used to compute the message digest. |
algorithm | a character value specifying the name of the message digest algorithm to use. If the specified algorithm is unknown, an error is thrown. |
computeMessageDigest | returns a character vector containing the string representations of the calculated message digests. The names of this vector are the given file names. If the file name does not exist, if it is not a regular file, or if the function encounters any failures during computation, then as a result, NA is given for that file name. |
computeMessageDigestFromBytes | returns a single string containing the calculated message digest for the raw vector bytes. This allows calculating message digests for bytes in memory. |
listMessageDigestAlgorithms | returns a character vector containing the names of the supported message digest algorithms. |
## list the supported message digest algorithms listMessageDigestAlgorithms()## compute the MD5 digest for a given raw vector computeMessageDigestFromBytes(as.raw(1:255), "MD5")
## Not run: ## equivalent to tools::md5sum(...) computeMessageDigest(c("file1.txt", "file2.bin", "file3.doc"), "MD5")
## SHA-1 computeMessageDigest("file4.zip", "SHA1") ## End(Not run)