method hmac.sha512
HMAC-SHA-512 of input under key (64 bytes).
Example:
use std.crypto { hmac }
use std.ser { bytesOf }
fn main() io {
print("{hmac.sha512(bytesOf(&"key"), bytesOf(&"message")).len()}")
}Вывод
64
pub(api) static fn sha512(key: bytes, input: bytes) -> bytesСложность. O(n) in the size of the input.
С версии. 1.0.0-beta
Параметры
| Имя | Тип |
|---|---|
key | bytes |
input | bytes |
Возвращает
bytes
Эффекты
не объявлены (чистая, пока тело не говорит иное)
Определено в: std/crypto/crypto.oxl:252