txcrypto

package
v0.0.6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 9, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package txcrypto should be used for tencent products. ref. https://www.kancloud.cn/idzqj/customer/1421041

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewMiniProgram

func NewMiniProgram(key, iv string) *miniprogram

NewMiniProgram is a constructor that should be used to create miniprogram struct.

func PKCS5Padding

func PKCS5Padding(ciphertext []byte, blockSize int) []byte

func PKCS5UnPadding

func PKCS5UnPadding(origData []byte) []byte

func PKCS7Padding

func PKCS7Padding(ciphertext []byte, blockSize int) []byte

func PKCS7UnPadding

func PKCS7UnPadding(origData []byte) []byte

Types

type Param

type Param map[string]interface{}

Param can store all decrypted values as a map

func (Param) String

func (p Param) String(k string) string

String will try to get a value from decrypted map. Empty will be returned if not found.

func (Param) Value

func (p Param) Value(k string) interface{}

Value same as String, but returned an interface{}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL