Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PrivKey ¶
type PrivKey interface { GetPublic() PubKey Marshal() ([]byte, error) Decrypt(cipherText []byte, label []byte) ([]byte, error) Sign(data []byte) ([]byte, error) Hash() []byte HashString() string }
PrivKey private key abstraction
func PrivateKeyNew ¶
PrivateKeyNew generate a new key
func UnmarshalPrivateKey ¶
UnmarshalPrivateKey parse a private key from bytes generated with PrivKey.Marshal
type PubKey ¶
type PubKey interface { Marshal() ([]byte, error) Encrypt(data []byte, label []byte) ([]byte, error) Verify(data []byte, signature []byte) (bool, error) Hash() []byte HashString() string }
PubKey public key abstraction
func UnmarshalPublicKey ¶
UnmarshalPublicKey parse a public key from bytes generated with PubKey.Marshal
Source Files ¶
Click to show internal directories.
Click to hide internal directories.