View Source WeChat.ServerMessage.Encryptor (wechat v0.18.0)

消息加解密

官方文档

Summary

Types

encoding_aes_key <> "=" 进行 Base.decode64!之后的值

服务器配置里的 EncodingAESKey 值,在接收消息时用于解密消息

Types

aes_key()

@type aes_key() :: String.t()

encoding_aes_key <> "=" 进行 Base.decode64!之后的值

encoding_aes_key()

@type encoding_aes_key() :: String.t()

服务器配置里的 EncodingAESKey 值,在接收消息时用于解密消息

encrypted_message()

@type encrypted_message() :: String.t()

message()

@type message() :: String.t()

Functions

decrypt(encrypted_message, aes_key)

@spec decrypt(encrypted_message(), aes_key()) :: {WeChat.appid(), message()}

encrypt(message, appid, aes_key)

@spec encrypt(message(), WeChat.appid(), aes_key()) :: encrypted_message()