OxL Справочник OxL
РусскийEnglish

method hmac.sha256

HMAC-SHA-256 of input under key (32 bytes).

Example:

oxl✓ проверяется в CI
use std.crypto { hmac }
use std.ser { bytesOf }

fn main() io {
  print("{hmac.sha256(bytesOf(&"key"), bytesOf(&"message")).len()}")
}
Вывод
32
pub(api) static fn sha256(key: bytes, input: bytes) -> bytes

С версии. 1.0.0-beta

Параметры

ИмяТип
keybytes
inputbytes

Возвращает

bytes

Эффекты

не объявлены (чистая, пока тело не говорит иное)

Определено в: std/crypto/crypto.oxl:218

См. также