Documentation ¶
Overview ¶
* @Author: kamalyes 501893067@qq.com * @Date: 2024-10-23 17:37:08 * @LastEditors: kamalyes 501893067@qq.com * @LastEditTime: 2024-10-23 17:58:07 * @FilePath: \go-toolbox\pkg\sign\aes.go * @Description: * * Copyright (c) 2024 by kamalyes, All Rights Reserved.
Index ¶
- func AesDecrypt(cipherText string, key []byte) (string, error)
- func AesEncrypt(plainText string, key []byte) (string, error)
- func GenerateByteKey(password string, length int) []byte
- func HmacSha256Base64(message string, secret string) string
- func HmacSha256Hex(message string, secret string) string
- func SHA256(text string) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateByteKey ¶
GenerateByteKey 生成一个指定字节的密钥
func HmacSha256Base64 ¶
HmacSha256Base64 计算hmac
func HmacSha256Hex ¶
HmacSha256Hex 字符串计算sha256之后转hex
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.