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