Create Compact Hash Digests of R Objects
Implementation of a function 'digest()' for the creation
of hash digests of arbitrary R objects (using the 'md5', 'sha-1', 'sha-256',
'crc32', 'xxhash' and 'murmurhash' algorithms) permitting easy comparison of R
language objects, as well as a function 'hmac()' to create hash-based
message authentication code. Please note that this package is not meant to
be deployed for cryptographic purposes for which more comprehensive (and
widely tested) libraries such as 'OpenSSL' should be used.
Compact hash representations of arbitrary R objects
The digest package provides a principal function
digest() for the
creation of hash digests of arbitrary R objects (using the md5, sha-1,
sha-256, crc32, xxhash and murmurhash algorithms) permitting easy comparison
of R language objects.
As R can serialize any object, we can run
digest() on any object:
R> library(digest) R> digest(trees)  "12412cbfa6629c5c80029209b2717f08" R> digest(lm(log(Height) ~ log(Girth), data=trees))  "e25b62de327d079b3ccb98f3e96987b1" R> digest(summary(lm(log(Height) ~ log(Girth), data=trees)))  "86c8c979ee41a09006949e2ad95feb41" R>
By using the hash sum, which is very likely to be unique, to identify an underlying object or calculation, one can easily caching strategies for which the digest package is somewhat widely used.
A small number of additional functions is available:
sha1()for numerally stable hashsums,
hmac()for hashed message authentication codes based on a key,
AES()for Advanced Encryption Standard block ciphers.
Please note that this package is not meant to be deployed for cryptographic purposes for which more comprehensive (and widely tested) libraries such as OpenSSL should be used.
Dirk Eddelbuettel, with contributions by Antoine Lucas, Jarek Tuszynski, Henrik Bengtsson, Simon Urbanek, Mario Frasca, Bryan Lewis, Murray Stokely, Hannes Muehleisen, Duncan Murdoch, Jim Hester, Wush Wu, Qiang Kou, Thierry Onkelinx, Michel Lang and Viliam Simko.
GPL (>= 2)
Functions in digest
|AES||Create AES block cipher object|
|digest||Create hash function digests for arbitrary R objects|
|sha1||Calculate a SHA1 hash of an object|
|hmac||compute a hash-based message authentication code|
|makeRaw||Create a raw object|
Vignettes of digest
Last month downloads
|License||GPL (>= 2)|
|Packaged||2018-01-14 18:58:24.19748 UTC; edd|
|Date/Publication||2018-01-14 22:02:36 UTC|
Include our badge in your README