R/utils_hash.R

Defines functions hash_object hash_file

hash_file <- function(path) {
  stopifnot(length(path) == 1L)
  secretbase::siphash13(file = path)
}

hash_object <- function(object) {
  secretbase::siphash13(x = object)
}

hash_null <- hash_object(object = NULL)

Try the targets package in your browser

Any scripts or data that you put into this service are public.

targets documentation built on June 22, 2024, 9:43 a.m.