| core_sha256 | R Documentation |
Hashes character or raw input with the self-contained SHA-256 in the
rmoriebricklayer core. For a character vector each element is hashed
as its UTF-8/native bytes; for a raw vector the raw bytes are hashed.
This is the same routine sibling packages use for provenance via
LinkingTo: rmoriebricklayer.
core_sha256(x)
x |
A character vector or a raw vector. |
A character vector of 64-character lowercase hex digests (one per element for character input; length-1 for raw input).
# Hash a character scalar (NIST test vector for "abc").
core_sha256("abc")
# ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad
# Vectorised over character input: one digest per element.
core_sha256(c("abc", "def"))
# Raw input hashes the bytes directly; identical to the character form.
identical(core_sha256("abc"), core_sha256(charToRaw("abc")))
# Fingerprint an arbitrary object via its serialization.
core_sha256(serialize(list(a = 1L, b = "x"), NULL))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.