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