Documentation ¶
Index ¶
- func AESDecrypt(cipher_text []byte, key AESKey) ([]byte, error)
- func AESEncrypt(secret_message []byte, key AESKey) ([]byte, error)
- func RSADecrypt(cipher_text []byte, private *rsa.PrivateKey) (string, error)
- func RSAEncrypt(secretmessage []byte, public_key *rsa.PublicKey) ([]byte, error)
- type AESKey
- type EllipticCurve
- func (ec *EllipticCurve) EncodeEccPrivateKey(privKey *ecdsa.PrivateKey) (key string, err error)
- func (ec *EllipticCurve) EncodeEccPublicKey(pubKey *ecdsa.PublicKey) (key string, err error)
- func (ec *EllipticCurve) GenerateEccKeys() (privateKey *ecdsa.PrivateKey, publicKey *ecdsa.PublicKey, err error)
- type Keys
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RSADecrypt ¶
func RSADecrypt(cipher_text []byte, private *rsa.PrivateKey) (string, error)
Types ¶
type EllipticCurve ¶
type EllipticCurve struct {
// contains filtered or unexported fields
}
func NewCurve ¶
func NewCurve(curve elliptic.Curve) *EllipticCurve
func (*EllipticCurve) EncodeEccPrivateKey ¶
func (ec *EllipticCurve) EncodeEccPrivateKey(privKey *ecdsa.PrivateKey) (key string, err error)
func (*EllipticCurve) EncodeEccPublicKey ¶
func (ec *EllipticCurve) EncodeEccPublicKey(pubKey *ecdsa.PublicKey) (key string, err error)
func (*EllipticCurve) GenerateEccKeys ¶
func (ec *EllipticCurve) GenerateEccKeys() (privateKey *ecdsa.PrivateKey, publicKey *ecdsa.PublicKey, err error)
Click to show internal directories.
Click to hide internal directories.