blob: 1662e87f7c68ff499f8fa0b2a25e5a89d0b1a437 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
|
.\"
.\" Copyright (c) 2024 Netflix, Inc.
.\"
.\" SPDX-License-Identifier: BSD-2-Clause
.\"
.Dd February 6, 2024
.Dt HASH 3lua
.Os
.Sh NAME
.Nm new ,
.Nm update ,
.Nm digest ,
.Nm hexdigest
.Nd Lua Cryptographic hash module.
.Sh DESCRIPTION
The built-in cryptographic hashing Lua bindings for the are available via the
.Ic hash
table.
.Ss Supported Hashing Schemes
The following hashing schemes are supported by the hash module.
.Bl -bullet -compact
.It
sha256
.El
.Ss APIs Supported
.Bl -tag -width asdf -compact
.It Fn new data
Compute a digest based on the
.Va data .
.It Fn update Va data
Using the current digest, process
.Va data
to compute a new digest as if all prior data had been concatenated together.
.It Fn digest
Return the hashed digest as a binary array.
This resets the context.
.It Fn hexdigest
Take
.Fn digest
and convert it to an upper case hex string.
This resets the context.
.It Va digest_size
Return the size of the digest, in bytes.
.It Va block_size
Return the block size used in bytes.
.El
.Sh EXAMPLES
.Sh SEE ALSO
.Xr sha256 3
.Sh AUTHORS
The
.Nm
man page was written by
.An Warner Losh Aq Mt imp@FreeBSD.org .
|