# digest v0.6.27

Monthly downloads

## 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', 'murmurhash', 'spookyhash' and 'blake3' algorithms) permitting easy
comparison of R language objects, as well as functions such as'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.

## Readme

## digest: Compact hash representations of arbitrary R objects

Compact hash representations of arbitrary R objects

### Overview

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, murmurhash, spookyhash and blake3 algorithms)
permitting easy comparison of R language objects.

#### Examples

As R can serialize any object, we can run `digest()`

on any object:

```
R> library(digest)
R> digest(trees)
[1] "12412cbfa6629c5c80029209b2717f08"
R> digest(lm(log(Height) ~ log(Girth), data=trees))
[1] "e25b62de327d079b3ccb98f3e96987b1"
R> digest(summary(lm(log(Height) ~ log(Girth), data=trees)))
[1] "86c8c979ee41a09006949e2ad95feb41"
R>
```

By using the hash sum, which is very likely to be unique, to identify an underlying object or calculation, one can easily implement caching strategies. This is a common use of the digest package.

#### Other Functions

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.

### Note

Please note that this package is not meant to be deployed for cryptographic purposes. More comprehensive and widely tested libraries such as OpenSSL should be used instead.

### Installation

The package is on CRAN and can be installed via a standard

```
install.packages("digest")
```

### Continued Testing

As we rely on the tinytest package, the already-installed package can also be verified via

```
tinytest::test_package("digest")
```

at any later point.

### Author

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, Viliam Simko, Kurt Hornik, Radford Neal, Kendon Bell, Matthew de Queljoe, Ion Suruceanu, Bill Denney, Dirk Schumacher, and Winston Chang.

### License

GPL (>= 2)

## Functions in digest

Name | Description | |

sha1 | Calculate a SHA1 hash of an object | |

AES | Create AES block cipher object | |

hmac | compute a hash-based message authentication code | |

makeRaw | Create a raw object | |

digest2int | hash arbitrary string to integer | |

getVDigest | Set a vectorised function for creating hash function digests | |

digest | Create hash function digests for arbitrary R objects | |

No Results! |

## Vignettes of digest

Name | ||

sha1.Rmd | ||

No Results! |

## Last month downloads

## Details

Date | 2020-10-20 |

URL | http://dirk.eddelbuettel.com/code/digest.html |

BugReports | https://github.com/eddelbuettel/digest/issues |

License | GPL (>= 2) |

VignetteBuilder | knitr |

NeedsCompilation | yes |

Packaged | 2020-10-20 13:03:32 UTC; edd |

Repository | CRAN |

Date/Publication | 2020-10-24 22:10:06 UTC |

suggests | knitr , minidown , rmarkdown , tinytest |

depends | R (>= 3.3.0) |

imports | utils |

Contributors | Dirk Eddelbuettel |

#### Include our badge in your README

```
[![Rdoc](http://www.rdocumentation.org/badges/version/digest)](http://www.rdocumentation.org/packages/digest)
```