pub struct WecomCrypto { /* private fields */ }Implementations§
Source§impl WecomCrypto
impl WecomCrypto
pub fn new(token: &str, receive_id: &str, aes_key: &str) -> Result<Self>
Sourcepub fn encrypt_msg(
&self,
msg: &str,
timestamp: &str,
nonce: &str,
) -> Result<(String, String)>
pub fn encrypt_msg( &self, msg: &str, timestamp: &str, nonce: &str, ) -> Result<(String, String)>
消息加密 @params: msg: 消息体明文 timestamp: 时间戳 nonce: 随机字符串 @return 0: 加密消息 1: 签名
pub fn decrypt_msg( &self, msg_signature: &str, timestamp: &str, nonce: &str, cipher_msg: &str, ) -> Result<String>
Auto Trait Implementations§
impl Freeze for WecomCrypto
impl RefUnwindSafe for WecomCrypto
impl Send for WecomCrypto
impl Sync for WecomCrypto
impl Unpin for WecomCrypto
impl UnwindSafe for WecomCrypto
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more