ii_secret

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2026 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// PEMBEGIN 私钥 PEMBEGIN 开头
	PEMBEGIN = "-----BEGIN RSA PRIVATE KEY-----\n"
	// PEMEND 私钥 PEMEND 结尾
	PEMEND = "\n-----END RSA PRIVATE KEY-----"
	// PUBPEMBEGIN 公钥 PEMBEGIN 开头
	PUBPEMBEGIN = "-----BEGIN PUBLIC KEY-----\n"
	// PUBPEMEND 公钥 PEMEND 结尾
	PUBPEMEND = "\n-----END PUBLIC KEY-----"
)

Variables

This section is empty.

Functions

func AESDecode

func AESDecode(crypt, iv, key string) string

func AESEncode

func AESEncode(src, iv, key string) string

func Base64Decode

func Base64Decode(src string) string

Base64Decode base解码

func Base64Encode

func Base64Encode(src string) string

Base64Encode base编码

func Base64Sha256

func Base64Sha256(src, key string) string

Base64Sha256 base64sha256验证

func FormatPrivateKey

func FormatPrivateKey(privateKey string) string

组装私钥

func FormatQuery

func FormatQuery(input map[string]interface{}) (concat string)

func HMAC_SHA1

func HMAC_SHA1(src, key string) string

HMAC_SHA1

func HMAC_SHA256

func HMAC_SHA256(src, key string) string

HMAC_SHA256 hmacsha256验证

func HMAC_SHA512

func HMAC_SHA512(src, key string) string

HMAC_SHA512 hmacsha512验证

func HexMD5

func HexMD5(content string) string

hexMd5 计算给定字符串的 MD5 哈希值,并返回大写的十六进制字符串

func MD5

func MD5(str string) string

MD5 md5

func PKCS5Padding

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

func PKCS5Trimming

func PKCS5Trimming(encrypt []byte) []byte

func RsaEncrypt

func RsaEncrypt(src, key string) string

func SHA1

func SHA1(src string) string

SHA1 SHA1验证

func SHA256

func SHA256(src string) string

SHA256 sha256验证

func SHA256WithKey

func SHA256WithKey(src string, privateKey string) string

func SHA512

func SHA512(src string) string

SHA512 sha512验证

func Sign

func Sign(input map[string]interface{}, secretKey string) (sign string, concat string)

Types

This section is empty.

Jump to

Keyboard shortcuts

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