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