cer_sha256: Compute the SHA-256 digest of a file

View source: R/integrity.R

cer_sha256R Documentation

Compute the SHA-256 digest of a file

Description

Compute the SHA-256 digest of a file

Usage

cer_sha256(file)

Arguments

file

Path to a local file.

Value

A length-1 character string (hex digest), or NA if the file does not exist. Uses digest::digest() when the digest package is available (recommended for research work), falling back to tools::md5sum() otherwise.

See Also

Other reproducibility: cer_cite(), cer_deposit_zenodo(), cer_legislative_instrument(), cer_manifest(), cer_manifest_clear(), cer_manifest_write(), cer_snapshot()

Examples

f <- tempfile()
writeLines("hello", f)
cer_sha256(f)

cer documentation built on Dec. 3, 2026, 1:06 a.m.