Versions in this module Expand all Collapse all v0 v0.0.1 Nov 14, 2023 Changes in this version + var KeyFormatErr = errors.New("the key format must be PKCS#1 or PKCS#8") + var PrivateKeyErr = errors.New("private key error") + var PublicKeyErr = errors.New("public key error") + func MD5(p []byte) []byte + func MD5ToString(p []byte) string + func RSADecryptByPrivateKey(key string, data []byte) ([]byte, error) + func RSADecryptByPublicKey(key string, data []byte) ([]byte, error) + func RSAEncryptByPrivateKey(key string, data []byte) (string, error) + func RSAEncryptByPublicKey(key string, data []byte) (string, error) + func RSAGenerateKey(bits int, format KeyFormat) (privateKey string, publicKey string, err error) + func SHA1(p []byte) []byte + func SHA1ToString(p []byte) string + func SHA256(p []byte) []byte + func SHA256ToString(p []byte) string + type KeyFormat uint8 + const PKCS1 + const PKCS8