Documentation
¶
Index ¶
- func DecryptPrivate(cipherText []byte) ([]byte, error)
- func DecryptPublic(cipherText []byte) ([]byte, error)
- func EncryptPrivate(src []byte) (bytesEncrypt []byte, err error)
- func EncryptPublic(src []byte) (bytesEncrypt []byte, err error)
- func FilteredSQLInject(to_match_str string) bool
- func GenerateRSAKey(bits int, outPath string, fileName string)
- func GetLocalIp() string
- func GetPathOfProgram() string
- func GetPathSymbol() string
- func IsRelease() bool
- func MD5(str string) string
- func MD5Any(object any) string
- func PrivateEncrypt(privt *rsa.PrivateKey, data []byte) ([]byte, error)
- func PublicDecrypt(pub *rsa.PublicKey, data []byte) ([]byte, error)
- func RandChar(size int) string
- func RandChar16H(size int) string
- func RandCharCrypto(size int) string
- func RemoteIp(r *http.Request) string
- func SHA1(str string) string
- func SHA256(str string) string
- func SaveConfigJson(path string, dest any) error
- func ScanConfigJson(path string, dest any)
- func SetPrivateKey(path string)
- func SetPrivateKeyByIO(fs io.Reader)
- func SetPublicKey(path string)
- func SetPublicKeyByIO(fs io.Reader)
- func UUID() string
- type ObjectId
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DecryptPrivate ¶
func DecryptPublic ¶
func EncryptPrivate ¶
RsaEncryptBlock 私钥加密-分段
func EncryptPublic ¶
RsaEncryptBlock 公钥加密-分段
func FilteredSQLInject ¶
func GenerateRSAKey ¶
生成RSA私钥和公钥,保存到文件中
func GetLocalIp ¶
func GetLocalIp() string
func GetPathOfProgram ¶
func GetPathOfProgram() string
func GetPathSymbol ¶
func GetPathSymbol() string
func PrivateEncrypt ¶
func PrivateEncrypt(privt *rsa.PrivateKey, data []byte) ([]byte, error)
func RandChar16H ¶
func RandCharCrypto ¶
func SaveConfigJson ¶
func ScanConfigJson ¶
func SetPrivateKey ¶
func SetPrivateKey(path string)
func SetPrivateKeyByIO ¶
func SetPublicKey ¶
func SetPublicKey(path string)
func SetPublicKeyByIO ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.