Documentation ¶
Index ¶
- func DecodePrivateKey(key []byte) (*rsa.PrivateKey, error)
- func Decrypt(ciphertext []byte, privateKey []byte) ([]byte, error)
- func Encrypt(plaintext []byte, publicKey []byte) ([]byte, error)
- func GenerateRSAKey(bits int) (*rsa.PrivateKey, error)
- func SaveRSAKey(privateKey *rsa.PrivateKey) error
- func Sign(digest, privateKey []byte) ([]byte, error)
- func Stringify(privateKey *rsa.PrivateKey) (pri string, pub string, err error)
- func Verify(signature, digest, publicKey []byte) (bool, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateRSAKey ¶
func GenerateRSAKey(bits int) (*rsa.PrivateKey, error)
Generate new RSA keypair
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.