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)
wlandau/targets documentation built on May 1, 2024, 7:27 p.m.