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

消息加解密

官方文档

Summary

Types

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

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

Types

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

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

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

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

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

Functions

Link to this function

decrypt(encrypted_message, aes_key)

View Source
@spec decrypt(encrypted_message(), aes_key()) :: {WeChat.appid(), message()}
Link to this function

encrypt(message, appid, aes_key)

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