Add redbean function for simple HMAC (#321)

This commit is contained in:
Paul Kulchenko 2021-11-12 16:26:14 -08:00 committed by GitHub
parent 8f05990d5a
commit 1bdc8faa65
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 32 additions and 0 deletions

View file

@ -616,6 +616,12 @@ FUNCTIONS
GetCookie(name:str) → str
Returns cookie value.
GetCryptoHash(name:str,payload:str[,key:str]) → str
Returns value of the specified cryptographic hash function. If the
key is provided, then HMAC value of the same function is returned.
The name can be one of the following strings: MD5, SHA1, SHA224,
SHA256, SHA384, SHA512, and BLAKE2B256.
GetRemoteAddr() → ip:uint32,port:uint16
Returns client ip4 address and port, e.g. 0x01020304,31337 would
represent 1.2.3.4:31337. This is the same as GetClientAddr except