View Source WeChat.Pay.Crypto (wechat v0.16.1)

用于支付加密相关

Summary

Functions

decrypt_aes_256_gcm(api_secret_key, ciphertext, associated_data, iv)

decrypt_secret_data(cipher_text, private_key)

解密敏感信息 - 官方文档

encrypt_secret_data(data, public_key)

加密敏感信息 - 官方文档

sign(env, timestamp, nonce_str, private_key)

签名 - 官方文档

v2_sign(params, key)

@spec v2_sign(data :: map(), key :: binary()) :: signature :: binary()

签名(v2) - 官方文档

v2_sign(plain_text, method, key)

@spec v2_sign(data :: binary() | map(), method :: binary(), key :: binary()) ::
  signature :: binary()

v2_verify(params, method, key)

verify(signature, timestamp, nonce, body, public_key)

验签 - 官方文档