Documentation
¶
Index ¶
- func AESDecryptCBC(ciphertext, key []byte) ([]byte, error)
- func AESDecryptGCM(ciphertext []byte, key []byte) ([]byte, error)
- func AESEncryptCBC(plaintext []byte, key []byte) (string, error)
- func AESEncryptGCM(Content []byte, key []byte) (string, error)
- func AESEncryptGCM2(Content []byte, key []byte) (string, error)
- func Base64Decode(str string) string
- func Base64Encode(str string) string
- func GeneratePassWd(src string) []byte
- func GenerateRsaKey(keySize int) error
- func GetEncoding(contentType string, body []byte) string
- func RsaPrivateDecode(cipherText []byte, private []byte) []byte
- func RsaPublicEncode(plainText []byte, filename string) []byte
- func SHA256Sum(data any) string
- func ToMD5(str string) string
- func ToSha256(str, keyStr string) string
- func TransCode(body []byte, encode string) string
- func ValidateBcryptPassWd(src string, passWd string) bool
- type TLSData
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AESDecryptCBC ¶
AESDecryptCBC cbc 解密
func AESEncryptCBC ¶
AESEncryptCBC CBC 加密
func RsaPrivateDecode ¶
RsaPrivateDecode 使用rsa私钥解密
func RsaPublicEncode ¶
RsaPublicEncode 使用rsa公钥加密文件
func ValidateBcryptPassWd ¶
ValidateBcryptPassWd 验证密码 第一个参数是明文 第二个参数是密文
Types ¶
type TLSData ¶
type TLSData struct {
TLSVersion string `json:"tls_version,omitempty"`
ExtensionServerName string `json:"extension_server_name,omitempty"`
DNSNames []string `json:"dns_names,omitempty"`
Emails []string `json:"emails,omitempty"`
CommonName []string `json:"common_name,omitempty"`
Organization []string `json:"organization,omitempty"`
IssuerCommonName []string `json:"issuer_common_name,omitempty"`
IssuerOrg []string `json:"issuer_organization,omitempty"`
FingerprintSHA256 string `json:"fingerprint_sha256,omitempty"`
FingerprintSHA256OpenSSL string `json:"fingerprint_sha256_openssl,omitempty"`
}
TLSData contains the relevant Transport Layer Security information
Click to show internal directories.
Click to hide internal directories.