Documentation ¶
Index ¶
- Constants
- type KX
- func (kx *KX) Bytes() (bytes []byte, err error)
- func (kx *KX) IsPrivateKey() (p bool)
- func (kx *KX) IsPublicKey() (p bool)
- func (kx *KX) KeyType() (kxt shared.KeyXType)
- func (kx *KX) Length() (length int)
- func (kx *KX) PublicKey() (kxPub shared.KeyExchange)
- func (kx *KX) PublicKeyInstance() (pubkey []byte)
- func (kx *KX) SharedSecret(kxPub2 shared.KeyExchange) (sharedsecret []byte, err error)
- func (kx *KX) String() (str string)
Constants ¶
View Source
const ( // TypeCrvPriv - identifier to be appended at the start of Bytes() to distinguish it as a Curve25519 private key TypeCrvPriv uint8 = 201 // TypeCrvPub - identifier to be appended at the start of Bytes() to distinguish it as a Curve25519 public key TypeCrvPub uint8 = 202 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type KX ¶
type KX struct {
// contains filtered or unexported fields
}
func (*KX) IsPrivateKey ¶
IsPrivateKey - returns if K is a private key instance
func (*KX) IsPublicKey ¶
IsPublicKey - returns if K is a public key instance
func (*KX) PublicKey ¶
func (kx *KX) PublicKey() (kxPub shared.KeyExchange)
PublicKey - returns instance of public key of type Key Exchange
func (*KX) PublicKeyInstance ¶
PublicKeyInstance - returns actual instance of public key of type
func (*KX) SharedSecret ¶
func (kx *KX) SharedSecret(kxPub2 shared.KeyExchange) (sharedsecret []byte, err error)
PublicKey - returns instance of public key of type Key Exchange
Click to show internal directories.
Click to hide internal directories.