% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/integrity.R
\name{cer_sha256}
\alias{cer_sha256}
\title{Compute the SHA-256 digest of a file}
\usage{
cer_sha256(file)
}
\arguments{
\item{file}{Path to a local file.}
}
\value{
A length-1 character string (hex digest), or \code{NA} if
the file does not exist. Uses \code{digest::digest()} when the
\code{digest} package is available (recommended for research work),
falling back to \code{tools::md5sum()} otherwise.
}
\description{
Compute the SHA-256 digest of a file
}
\examples{
f <- tempfile()
writeLines("hello", f)
cer_sha256(f)
}
\seealso{
Other reproducibility: 
\code{\link{cer_cite}()},
\code{\link{cer_deposit_zenodo}()},
\code{\link{cer_legislative_instrument}()},
\code{\link{cer_manifest}()},
\code{\link{cer_manifest_clear}()},
\code{\link{cer_manifest_write}()},
\code{\link{cer_snapshot}()}
}
\concept{reproducibility}
