Docs.rs
spdb-sm2-0.1.1
spdb-sm2 0.1.1
Docs.rs crate page
MIT
OR
Apache-2.0
Links
Repository
crates.io
Source
Owners
yinxu46
Dependencies
base64 ^0.22.1
normal
byteorder ^1.5.0
normal
efficient-sm2 ^0.2.4
normal
hex ^0.4
normal
libsm ^0.6
normal
md5 ^0.7
normal
num-bigint ^0.4
normal
num-traits ^0.2
normal
openssl ^0.10
normal
sha1 ^0.10
normal
sha2 ^0.10
normal
smcrypto ^0.3
normal
thiserror ^1
normal
yasna ^0.5.2
normal
Versions
53.33%
of the crate is documented
Platform
x86_64-unknown-linux-gnu
Feature flags
docs.rs
About docs.rs
Badges
Builds
Metadata
Shorthand URLs
Download
Rustdoc JSON
Build queue
Privacy policy
Rust
Rust website
The Book
Standard Library API Reference
Rust by Example
The Cargo Guide
Clippy Documentation
encrypt
spdb_
sm2
0.1.1
encrypt
Sections
加密
In crate spdb_
sm2
spdb_sm2
Function
encrypt
Copy item path
Source
pub fn encrypt(data: &
str
, secret: &
str
) ->
Result
<
String
,
Sm2Error
>
Expand description
§
加密
data: 待加密数据
secret: 私钥( APP唯一秘钥:X_SPDB_CLIENT_SECRET, 秘钥有过期时间,注意存储方式 )