WeChat.ServerMessage.Encryptor (wechat v0.2.0)
消息加解密
Link to this section Summary
Link to this section Types
Link to this type
aes_key()
Specs
aes_key() :: String.t()
对 encoding_aes_key <> "="
进行 Base.decode64!
之后的值
Link to this type
encoding_aes_key()
Specs
encoding_aes_key() :: String.t()
服务器配置里的 EncodingAESKey
值,在接收消息时用于解密消息
Link to this type
encrypted_message()
Specs
encrypted_message() :: String.t()
Link to this type
message()
Specs
message() :: String.t()
Link to this section Functions
Link to this function
decode_padding_with_pkcs7(data)
Link to this function
decrypt(encrypted_message, aes_key)
Specs
decrypt(encrypted_message(), aes_key()) :: {WeChat.appid(), message()}
Link to this function
encode_padding_with_pkcs7(data)
Link to this function
encrypt(message, appid, aes_key)
Specs
encrypt(message(), WeChat.appid(), aes_key()) :: encrypted_message()