Computes a canonical content digest and signs the manifest using a keyed
HMAC-SHA256 signature via openssl::sha256().
Examples
tmp <- tempfile("rcapsule_sign_")
dir.create(tmp)
writeLines("x <- 1", file.path(tmp, "run.R"))
m <- create_capsule_manifest(tmp)
m_signed <- sign_manifest(m, key = "demo-secret-key")
verify_manifest_integrity(m_signed, key = "demo-secret-key")$valid
#> [1] TRUE
unlink(tmp, recursive = TRUE)
