Documentation
¶
Index ¶
- func CreateKey() (string, string)
- func ECCDecrypt(ct []byte, privateKey string) ([]byte, error)
- func ECCEncrypt(pt []byte, publicKey string) ([]byte, error)
- func ECCSign(plainText []byte, priPath string) ([]byte, []byte, error)
- func ECCVerify(plainText, rText, sText []byte, pubPath string) (bool, error)
- func EccDecrypt(cipherText []byte, filePath string) (plainText []byte, err error)
- func EccEncrypt(plainText []byte, filePath string) ([]byte, error)
- func Ecrecover(data []byte, signature string) (string, error)
- func GenerateECCKey(keySize int, dirPath string) error
- func GetPublicKeyByPrivateKey(privateKey string) (string, error)
- func Sign(privateKey string, data []byte) (string, error)
- func Verify(publicKey string, data []byte, signature string) bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ECCDecrypt ¶
ECCDecrypt decrypt data by private key
func ECCEncrypt ¶
ECCEncrypt encrypt data by public key
func EccDecrypt ¶
ECC 解密 cipherText 密文 filePath 私钥文件路径 返回 明文 错误
func EccEncrypt ¶
Ecc 加密 plainText 明文 filePath 公钥文件路径 返回 密文 错误
func GenerateECCKey ¶
生成ECC私钥对 keySize 密钥大小, 224 256 384 521 dirPath 密钥文件生成后保存的目录 返回 错误
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.