Compact hash digests of arbitrary R objects
open sourceGPL-2.0-or-laterfree
digest is an open source R package by Dirk Eddelbuettel whose digest() function creates hash digests of arbitrary R objects, so they can be compared or used as cache keys. It supports md5, sha-1, sha-256, crc32, xxhash, MurmurHash, SpookyHash, BLAKE3, crc32c, xxh3 and Fletcher, and also creates HMACs with hmac(). Its makers say it isn't meant for cryptographic use.
Problems it solves
- hash an R object to use as a cache key
- check whether two R data frames are identical without comparing them element by element
- compute an MD5 or SHA-256 checksum in R
Features
- digest() for arbitrary R objects
- md5, sha-1, sha-256, crc32, crc32c and Fletcher
- xxhash, xxh3_64 and xxh3_128, MurmurHash and SpookyHash
- BLAKE3
- hmac() for hash-based message authentication codes
Limitations
- Not meant for cryptographic purposes; its makers point to more comprehensive libraries such as OpenSSL for those.1
