use rand::RngCore;

fn main() {
    let test_word = b"hello world";

    let mut private_key = [0; 32];
    rand::thread_rng().fill_bytes(&mut private_key);

    let key_pair = efficient_sm2::KeyPair::new(&private_key).unwrap();

    // signing in sm2
    let sig = key_pair.sign(test_word).unwrap();

    // verification sm2 signature
    sig.verify(&key_pair.public_key(), test_word).unwrap();
}

