rsa_sign

Crates.iorsa_sign
lib.rsrsa_sign
version0.1.2
sourcesrc
created_at2021-03-31 03:20:43.22641
updated_at2021-03-31 07:45:48.496147
descriptionrsa_sign
homepage
repository
max_upload_size
id376005
size9,809
wuhuarou (wobusbz)

documentation

README

let _ = "C9s1PRX+RdSOtr2C77cJ9TLIqLCXPeWXkniL6BHVUwlNRdgJXlE33DayytD6r/WqksYqGAIT0JWBuLQxh9VdrtgTlGYqabLrg3orUD5vV9cPbAXk7GTJ6kAgBr3wL6Ub+IaKqgXaYRxhUx8hR56yv8a4WIy4JZZW1Thj3DJDCRcsAtPjYqdKOxEhfyLmoQkkr5q9kwNXea13O+ykO2tFmIuekz/4cjrpLmNa3sVdj6qJmijbzvKkJ89+/SUlDI6iKVtbRLDDafwiDIDPk7pG0hb/D+A9MQow38+4eSYJiKpK71M5zr5IMGpoHXXSVHomVoZhhI/LWK8fi3uRaKkubw==";
let file_content = r#"
-----BEGIN RSA PUBLIC KEY-----
MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAimFB73SETSDJWBOLXlFj
8073mJTqHBHgdquOyScd2MJNdbUD+DWWtJ6u6LO18oahCVjTmWGUO8xAz9BwzTZ6
TM1OrLt8Y1D9ybJ0PSljqYavb1u0qhMUTJOknInHKsZZ+f49De7MkKna9LUWKInq
m12QrX2ge2aAxfDThPvQ1x7IctIY4g1yCCC0UIYfvMaQIGN1p9SWD6VAVA9hUDlj
OX7dhZD3lsyLT6vZvZl6YfoWEomA34yTmR5J9zXZNJrXTHcelCWr1Y/v5EBUzJ8A
TzRLJxLLocDXSabw+c6ITDFF326eckx74Giqn+qo6QVf8gy9t7orYswcETpbximP
RwIDAQAB
-----END RSA PUBLIC KEY-----
"#;
   
let private_file_content = r#"
-----BEGIN RSA PRIVATE KEY-----
MIIEowIBAAKCAQEAimFB73SETSDJWBOLXlFj8073mJTqHBHgdquOyScd2MJNdbUD+DWWtJ6u6LO18oahCVjTmWGUO8xAz9BwzTZ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AJiyaP6D20ywUwCTEVQOz20LjMriHTYDqFNu90jW5Sigbt963n7N5tQKBgEsoeZS7FHIAHkfm5flTyZOjuBgIkntfZUShVDZ9FAZlNeh+qFatMyo1n+teZ6nK5V022tBr2PiWZ7t6IvKhlvjq7/II14bjzM9Fr41A55MmV2XHrJQ8QlrKA5GRKxOPk8lYll5M9pHyoFr1o/KW8n63uLrRqH6x4lCwGyRm6xqBAoGBAPhXAINL9xbxms6+1kohQm8193eVt1ikv5DBT5+LHxdIkQPObmnliOaDuOMk0o0mhnrUo46pEslsNjBGNb/Cbc+wVH7s94jNd2mFWfr6A9kWX1cC5g164gx8/d+/tXPaVHdkIQ7piAOUg2xLq9Zr2xAEXKJXBNH6rnhVnFza/Vt8
-----END RSA PRIVATE KEY-----
"#;
    let sign_string = send_sign::send_sign(private_file_content, &"a=2&b=3&c=4");
    assert_eq!(sign_string.is_empty(), false);
    let is_ok = verify_sign::verify_sign(file_content, &sign_string, "a=2&b=3&c=4".to_string());
    assert_eq!(is_ok, true);
Commit count: 0

cargo fmt