Crates.io | rust_sm |
lib.rs | rust_sm |
version | 0.1.7 |
source | src |
created_at | 2020-09-11 09:34:48.016128 |
updated_at | 2020-09-17 02:45:05.85197 |
description | A rust implementation for sm. |
homepage | https://github.com/wangmarkqi/rust_sm.git |
repository | https://github.com/wangmarkqi/rust_sm.git |
max_upload_size | |
id | 287314 |
size | 13,971,607 |
GenKeyPair();
Examples
let pk="./pk.pem";
let sk="./sk.pem";
let enc=Sm2Enc(pk,"testmsg");
let dec=Sm2Dec(sk,&enc);
Examples
let pk="./pk.pem";
let sk="./sk.pem";
let sign=Sm2Sign(sk,"testmsg");
let istrue=Sm2Verify(pk,"testmsg",&sign);
Examples
let enc=Sm3("testmsg");
Examples
let k = "1234567890abcdef";
let enc=Sm4Enc(k,"testmsg");
let dec=SmeDec(k,&enc);