#' Hash128 class
#'
#' The hex representation of a 128-bit hash.
#'
#' A character vector where each element must match the regular expression
#' \code{"^$|^[A-Fa-f0-9]{32}$"}.
#'
#' @export Hash128
#' @exportClass Hash128
Hash128 <- setClass("Hash128", contains = "character")
validHash128Object <- function(object) {
if (!all(grepl("^$|^[A-Fa-f0-9]{32}$", object))) {
return("Invalid hash.")
}
return(TRUE)
}
setValidity("Hash128", validHash128Object)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.