R/random_hash.R

Defines functions random_hash

Documented in random_hash

#' random_hash
#'
#' Generates a random hash
#'
#' @export
#'
random_hash <- function() {
  tmp <- format(Sys.time(), "%Y%m%d%H%M%S%OS3") %>%
    as.numeric() * stats::runif(1, 1, 1000000)

  tmp %>%
    as.character() %>%
    openssl::sha1()
}
ScottishCovidResponse/SCRCdataAPI documentation built on July 26, 2023, 9:47 p.m.