Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PrivateKey ¶
type PrivateKey interface { Key // Sign signs digest using key k. Sign(digest []byte) ([]byte, error) // Return a public key paired with this private key PublicKey() PublicKey }
PrivateKey represents a private key that can be used to generate a public key and sign data
type PublicKey ¶
type PublicKey interface { Key // Address gets address from public key Address() (types.Address, error) // Verify that 'sig' is the signed hash of 'data' Verify(digest []byte, sig []byte) (bool, error) }
PublicKey is a public key that can be used to verify data signed with the corresponding private key
type SymmetricKey ¶
type SymmetricKey interface { Key // Encrypt encrypts plain text using symmetric key. Encrypt(plain []byte) (cipher []byte, err error) // Decrypt decrypts ciphertext using symmetric key. Decrypt(cipher []byte) (plain []byte, err error) }
SymmetricKey is a interface that provides symmetric encrypt and decrypt.
Click to show internal directories.
Click to hide internal directories.