| orderly_hash_file | R Documentation |
Use orderly's hashing functions. This is intended for advanced
users, in particular those who want to create hashes that are
consistent with orderly from within plugins. The default
behaviour is to use the same algorithm as used in the orderly root
(via the root argument, and the usual root location
approach). However, if a string is provided for algorithm you
can use an alternative algorithm.
orderly_hash_file(path, algorithm = NULL, root = NULL)
orderly_hash_data(data, algorithm = NULL, root = NULL)
path |
The name of the file to hash |
algorithm |
The name of the algorithm to use, overriding that in the orderly root. |
root |
The path to the root directory, or |
data |
A string to hash |
A string in the format <algorithm>:<digest>
orderly_hash_data("hello", "md5")
# If you run this function from within the working directory of an
# orderly root, then you can omit the algorithm and it will use
# the algorithm used by orderly (which will be sha256):
path <- orderly_example()
withr::with_dir(path, orderly_hash_data("hello"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.