Documentation
¶
Index ¶
- Constants
- func Decrypt(ownerPrivateKey, otherPublicKey, text []byte) ([]byte, error)
- func Encrypt(ownerPrivateKey, otherPublicKey, text []byte) ([]byte, error)
- func GenerateSharedSecret(privKey, pubKey []byte) ([]byte, error)
- func Sign(str []byte, private []byte, reader io.Reader) ([]byte, error)
- func Verify(pub []byte, str []byte, sigb []byte) (bool, error)
- type Keys
- type PrivateKey
- type PublicKey
- type Signature
Constants ¶
View Source
const ( P521 = "P521" P384 = "P384" P256 = "P256" )
Variables ¶
This section is empty.
Functions ¶
func Encrypt ¶
Encrypt secures and authenticates its input using the public key using ECDHE with AES-128-CBC-HMAC-SHA1.
func GenerateSharedSecret ¶
Types ¶
type PrivateKey ¶
PrivateKey represents an ECDSA private key.
func (*PrivateKey) MarshalText ¶
func (p *PrivateKey) MarshalText() (text []byte, err error)
func (*PrivateKey) UnmarshalText ¶
func (p *PrivateKey) UnmarshalText(text []byte) error
type PublicKey ¶
PublicKey represents an ECDSA public key.
func (*PublicKey) MarshalText ¶
func (*PublicKey) UnmarshalText ¶
Click to show internal directories.
Click to hide internal directories.