Documentation ¶
Index ¶
- func BytesToPrivKey(b []byte) *rsa.PrivateKey
- func BytesToPubKey(b []byte) (pub *rsa.PublicKey)
- func Decrypt(priv *rsa.PrivateKey, cipherBytes []byte) []byte
- func Encrypt(pub *rsa.PublicKey, plainBytes []byte) []byte
- func GenerateKeyPair() *rsa.PrivateKey
- func GenerateKeyPairWithSeed(seed []byte) *rsa.PrivateKey
- func PrivKeyToBytes(priv *rsa.PrivateKey) []byte
- func PubKeyToBytes(pub *rsa.PublicKey) []byte
- func Sign(priv *rsa.PrivateKey, plainBytes []byte) []byte
- func Verify(pub *rsa.PublicKey, plainBytes, cipherBytes []byte) bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BytesToPrivKey ¶
func BytesToPrivKey(b []byte) *rsa.PrivateKey
func BytesToPubKey ¶
func GenerateKeyPair ¶
func GenerateKeyPair() *rsa.PrivateKey
func GenerateKeyPairWithSeed ¶
func GenerateKeyPairWithSeed(seed []byte) *rsa.PrivateKey
func PrivKeyToBytes ¶
func PrivKeyToBytes(priv *rsa.PrivateKey) []byte
func PubKeyToBytes ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.