Versions in this module Expand all Collapse all v1 v1.0.7 May 10, 2024 Changes in this version + type Decoder interface + Decode func([]byte) ([]byte, error) + type Des3Encoding struct + func NewDes3Encoding(des3key string) *Des3Encoding + func (h *Des3Encoding) Decode(b []byte) ([]byte, error) + func (h *Des3Encoding) Encode(b []byte) ([]byte, error) + type Encoder interface + Encode func([]byte) ([]byte, error) + type RsaDecoder struct + func NewRsaDecoder(privKey []byte) (*RsaDecoder, error) + func (r *RsaDecoder) Decode(b []byte) ([]byte, error) + type RsaEncoder struct + func NewRsaEncoder(publicKey []byte) (*RsaEncoder, error) + func (r *RsaEncoder) Encode(data []byte) ([]byte, error) + type SignVerifier interface + Verify func(mess, timestamp, data, sign string) (bool, error) + func NewHmacSignVerifier(appKey string) (SignVerifier, error) + func NewRsaSignVerifier(publicKey, appKey string) (SignVerifier, error) + type Signer interface + Sign func(mess, timestamp, data string) (string, error) + func NewHmacSigner(appKey string) (Signer, error) + func NewRsaSigner(privateKey, appkey string) (Signer, error)