#sm3 #algorithm #standards #china #sm3-hash

gm-sm3

A Rust Implementation of China's Standards of Encryption Algorithms SM3

1 unstable release

0.10.0 Apr 17, 2023
0.9.0 Apr 17, 2023

#2268 in Cryptography

Download history 21/week @ 2024-02-05 2/week @ 2024-02-19 11/week @ 2024-02-26 13/week @ 2024-03-11 6/week @ 2024-03-18 2/week @ 2024-03-25 41/week @ 2024-04-01

62 downloads per month
Used in gm-sm2

MIT license

8KB
183 lines

gm-sm3

A Pure Rust High-Performance Implementation of China's Standards of Encryption Algorithms SM3

Example

use crate::sm3_hash;

fn main() {
    let hash = sm3_hash(b"abc");
    let r = hex::encode(hash.as_ref().unwrap());
    assert_eq!("66c7f0f462eeedd9d1f2d46bdc10e4e24167c4875cf2f7a2297da02b8f4ba8e0", r);
}

No runtime deps