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

method sha2.sha256

The SHA-256 digest of input (32 bytes).

Example:

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

fn main() io {
  print(hex(&sha2.sha256(bytesOf(&"abc"))))
}
Вывод
ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad
pub(api) static fn sha256(input: bytes) -> bytes

С версии. 1.0.0-beta

Параметры

ИмяТип
inputbytes

Возвращает

bytes

Эффекты

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

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

См. также