checksum: Calculate Checksums and Cryptographic Hashes

checksumR Documentation

Calculate Checksums and Cryptographic Hashes

Description

This is a generic function for applying cryptographic hash functions and calculating checksums for externally-stored R objects.

Usage

checksum(x, ...)

## S4 method for signature 'character'
checksum(x, algo = "sha1", ...)

## S4 method for signature 'matter_'
checksum(x, algo = "sha1", ...)

Arguments

x

A file path or an object to be hashed.

algo

The hash function to use.

...

Additional arguments to be passed to the hash function.

Details

The method for matter objects calculates checksums of each of the files in the object's paths.

Value

A character vector giving the hash or hashes of the object.

Author(s)

Kylie A. Bemis

See Also

digest

Examples

x <- matter(1:10)
y <- matter(1:10)

checksum(x)
checksum(y) # should be the same

kuwisdelu/matter documentation built on Oct. 19, 2024, 10:31 a.m.