% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/integrity.R
\name{ato_sha256}
\alias{ato_sha256}
\title{Compute the SHA-256 digest of a file}
\usage{
ato_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.
}
\description{
Wraps \code{\link[tools:md5sum]{tools::md5sum()}} style behaviour for SHA-256 via the
\code{digest} package when available, or falls back to a pure-R
implementation via \code{\link[tools:md5sum]{tools::md5sum()}} + file length as a weaker
check. For integrity work PBO/Grattan-grade, install the
\code{digest} package (Suggests).
}
\examples{
f <- tempfile()
writeLines("hello", f)
ato_sha256(f)
}
\seealso{
Other reproducibility: 
\code{\link{ato_deposit_zenodo}()},
\code{\link{ato_manifest}()},
\code{\link{ato_manifest_clear}()},
\code{\link{ato_manifest_write}()},
\code{\link{ato_snapshot}()}
}
\concept{reproducibility}
