Documentation ¶
Index ¶
- Variables
- type Key
- func (k *Key) Decrypt(in []byte) (out []byte, err error)
- func (k *Key) Encrypt(in []byte) (out []byte, err error)
- func (k *Key) GetPrivString() string
- func (k *Key) GetPubString() string
- func (k *Key) SetPrivString(priv string) error
- func (k *Key) SetPubString(pub string) error
- func (k *Key) Sign(hash []byte) (string, error)
- func (k *Key) Verify(hash []byte, signature string) error
Constants ¶
This section is empty.
Variables ¶
View Source
var Curve = elliptic.P256
Functions ¶
This section is empty.
Types ¶
type Key ¶
type Key struct {
// contains filtered or unexported fields
}
func CreateKeyPair ¶
func NewFromStrings ¶
func (*Key) Decrypt ¶
Decrypt authentications and recovers the original message from its input using the private key and the ephemeral key included in the message.
func (*Key) Encrypt ¶
Encrypt secures and authenticates its input using the public key using ECDHE with AES-128-CBC-HMAC-SHA1.
func (*Key) GetPrivString ¶
func (*Key) GetPubString ¶
func (*Key) SetPrivString ¶
func (*Key) SetPubString ¶
Click to show internal directories.
Click to hide internal directories.