sha512: Cryptographic Hashing Using the SHA-512 Algorithm
Description
Returns a SHA-512 hash or HMAC of the supplied R object. Uses the optimised
implementation from the Mbed TLS library.
Usage
sha512(x, key = NULL)
Value
A 'nanoHash' object - raw vector of length 64.
Arguments
x
an object.
key
(optional) supply a secret key to generate an HMAC. If missing or
NULL, the SHA-512 hash of 'x' is returned.
Details
For arguments 'x' and 'key', a raw vector is hashed directly, a
character string is converted using charToRaw, whilst other
objects are serialised first.
Use as.character() to convert the returned raw vector to a single
character string.