# SHA3-256 hash as character string:
sha3("secret base")
# SHA3-256 hash as raw vector:
sha3("secret base", convert = FALSE)
# SHA3-224 hash as character string:
sha3("secret base", bits = 224)
# SHA3-384 hash as character string:
sha3("secret base", bits = 384)
# SHA3-512 hash as character string:
sha3("secret base", bits = 512)
# SHA3-256 hash a file:
file <- tempfile(); cat("secret base", file = file)
sha3(file = file)
unlink(file)
Run the code above in your browser using DataLab