Documentation
¶
Index ¶
- func BytesToPrivateKey(priv []byte) (*rsa.PrivateKey, error)
- func BytesToPublicKey(pub []byte) (*rsa.PublicKey, error)
- func CheckSig(msg []byte, sig []byte, pub *rsa.PublicKey) error
- func DecodeAesJson(cipherText string, priv string, dest interface{}) error
- func DecryptAes(cipherText []byte, key []byte) ([]byte, error)
- func DecryptWithPrivateKey(ciphertext []byte, priv *rsa.PrivateKey) ([]byte, error)
- func EncryptAes(plainText []byte, key []byte) ([]byte, error)
- func EncryptAesJson(data interface{}, priv string) (string, error)
- func EncryptWithPublicKey(msg []byte, pub *rsa.PublicKey) ([]byte, error)
- func GenerateKeyPair(bits int) (*rsa.PrivateKey, *rsa.PublicKey, error)
- func GenerateKeyPairBase64(bits int) (string, string, error)
- func PrivateKeyToBytes(priv *rsa.PrivateKey) []byte
- func PublicKeyToBytes(pub *rsa.PublicKey) ([]byte, error)
- func SignMessage(msg []byte, priv *rsa.PrivateKey) ([]byte, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BytesToPrivateKey ¶
func BytesToPrivateKey(priv []byte) (*rsa.PrivateKey, error)
func DecodeAesJson ¶
func DecryptWithPrivateKey ¶
func DecryptWithPrivateKey(ciphertext []byte, priv *rsa.PrivateKey) ([]byte, error)
func EncryptAesJson ¶
func EncryptWithPublicKey ¶
func GenerateKeyPair ¶
func PrivateKeyToBytes ¶
func PrivateKeyToBytes(priv *rsa.PrivateKey) []byte
func SignMessage ¶
func SignMessage(msg []byte, priv *rsa.PrivateKey) ([]byte, error)
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.