Documentation
¶
Index ¶
- func GenRsaKey(bits int) (prvkey, pubkey []byte, err error)
- func RsaDecrypt(prvkey, cipher []byte) ([]byte, error)
- func RsaDecryptBase64(prvkey []byte, data string) ([]byte, error)
- func RsaEncrypt(pubkey, data []byte) ([]byte, error)
- func RsaEncryptBase64(pubkey, data []byte) (string, error)
- func RsaSign(prvkey []byte, hash crypto.Hash, data []byte) ([]byte, error)
- func RsaVerifySign(pubkey []byte, hash crypto.Hash, data, sig []byte) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RsaDecrypt ¶
RsaDecrypt decrypts data using rsa private key.
func RsaDecryptBase64 ¶
RsaDecryptBase64 decrypts data using rsa private key.
func RsaEncrypt ¶
RsaEncrypt encrypts data using rsa public key.
func RsaEncryptBase64 ¶
RsaEncryptBase64 encrypts data using rsa public key.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.