Documentation ¶
Index ¶
- func AesDecrypt(cryted []byte, key []byte) []byte
- func AesEncrypt(orig []byte, key []byte) []byte
- func DecryptRsa(encData []byte, priv *rsa.PrivateKey) (data []byte, err error)
- func EncryptRSA(data []byte, pub *rsa.PublicKey) (encData []byte, err error)
- func GenerateKeyPair(bitsCnt int) (*rsa.PrivateKey, *rsa.PublicKey)
- func KeyGenerated(ph string) bool
- func LoadRSAKey(savePath string, passwd []byte) (priv *rsa.PrivateKey, pub *rsa.PublicKey, err error)
- func PKCS7Padding(ciphertext []byte, blocksize int) []byte
- func PKCS7UnPadding(origData []byte) []byte
- func ParsePubKey(pubkey []byte) (pub *rsa.PublicKey, err error)
- func PubKey2Addr(pk *rsa.PublicKey) string
- func PubKeyBytes2Addr(pubk []byte) string
- func PubKeyToBytes(pub *rsa.PublicKey) (pubkey []byte, err error)
- func Save2File(savePath string, privKey *rsa.PrivateKey, password string) error
- func SignRSA(data []byte, priv *rsa.PrivateKey) (signData []byte, err error)
- func VerifyRSA(data []byte, sig []byte, pub *rsa.PublicKey) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AesDecrypt ¶
func AesEncrypt ¶
func DecryptRsa ¶
func DecryptRsa(encData []byte, priv *rsa.PrivateKey) (data []byte, err error)
func GenerateKeyPair ¶
func GenerateKeyPair(bitsCnt int) (*rsa.PrivateKey, *rsa.PublicKey)
func KeyGenerated ¶
func LoadRSAKey ¶
func PKCS7Padding ¶
func PKCS7UnPadding ¶
func PubKey2Addr ¶
func PubKeyBytes2Addr ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.