PKI.digest computes digsest sum based on the hash function specified

PKI.digest(what, hash = c("SHA1", "SHA256", "MD5"))

Arguments

what

raw vector of bytes to digest

hash

type of the hash function. Note that "MD5" should not be used for cryptographic purposes as it is not secure

Value

Raw vector containg the hash

Author

Simon Urbanek

See also

Examples

  PKI.digest(as.raw(1:10))
#>  [1] c5 39 1e 30 8a f2 5b 42 d5 93 4d 6a 20 1a 34 e8 98 d2 55 c6