diff options
author | Hugo Hörnquist <hugo@lysator.liu.se> | 2023-09-12 10:23:59 +0200 |
---|---|---|
committer | Hugo Hörnquist <hugo@lysator.liu.se> | 2023-09-12 10:25:14 +0200 |
commit | 108a0454d05c744c4a05e298cfc8cbf157952414 (patch) | |
tree | ca99bed5d49eabfb644c3b1c0a397b1354efdaf3 /doc/ref/general/crypto.texi | |
parent | Change overarching structure of info document. (diff) | |
download | calp-108a0454d05c744c4a05e298cfc8cbf157952414.tar.gz calp-108a0454d05c744c4a05e298cfc8cbf157952414.tar.xz |
Rework file tree structure for info files.
Diffstat (limited to 'doc/ref/general/crypto.texi')
-rw-r--r-- | doc/ref/general/crypto.texi | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/doc/ref/general/crypto.texi b/doc/ref/general/crypto.texi new file mode 100644 index 00000000..b9e362d3 --- /dev/null +++ b/doc/ref/general/crypto.texi @@ -0,0 +1,17 @@ +@node Cryptographic and Hash Procedures +@section Cryptographic and Hash Procedures + +This module links libcrypto, exposing some hash procedures. + +@defun sha256 message +Calculate the sha256-sum of @var{message}. The message can either be a +bytevector or a string (in which case it will de encoded as UTF-8). + +Returns the checksum as a bytevector. +@end defun + +@defun checksum->string message-digest [port] +Generates a hex digest string from a checksum (generated by +@code{sha256}). The checksum is written to @var{port} if given, or +returned as a string otherwise. +@end defun |