[][src]Module yogcrypt::sm3

An implementation of the SM3 cryptographic hash standard.

Usage

extern crate yogcrypt;
use yogcrypt::sm3::{sm3_enc};

let msg = b"abcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcd";

let hash = sm3_enc(msg);
assert_eq!(
    hash,
    [
        0xdebe9ff9, 0x2275b8a1, 0x38604889, 0xc18e5a4d, 0x6fdb70e5, 0x387e5765, 0x293dcba3,
        0x9c0c5732
    ]
);

Reference

Most variable's name in the source code are in accordance with the document.

OSCCA: SM3 document

Functions

sm3_enc

Compute the hash of the given message

Type Definitions

HashValue