Documentation ¶
Index ¶
- func CryptSignByEcc(input, priKeyFile, randSign string) (output string, err error)
- func GenerateKey(randKey, pemKeyPath string) error
- func GetRandomString(length int) string
- func UnSignCryptEcc(cryptBytes []byte) (rint, sint big.Int, err error)
- func VerifyCryptEcc(srcStr, cryptStr, pubKeyFile string) (bool, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CryptSignByEcc ¶
使用ECC算法加密签名,返回签名数据 @param input 加密数据 @param priKeyFile 私钥文件 @param randSign 随机字符串
func GenerateKey ¶
生成ECC算法的公钥和私钥文件 根据随机字符串生成,randKey至少36位
func UnSignCryptEcc ¶
使用ECC算法解密,返回加密前的椭圆曲线大整数
func VerifyCryptEcc ¶
使用ECC算法,对密文和明文进行匹配校验 @param srcStr 明文 @param cryptStr 密文 @param publicFile 公钥文件
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.