Documentation
¶
Index ¶
Constants ¶
View Source
const ( TypeEC = iota TypeRSA )
Type of Themis key.
View Source
const ( KEYTYPE_EC = TypeEC KEYTYPE_RSA = TypeRSA )
Type of Themis key.
Deprecated: Since 0.11. Use "keys.Type..." constants instead.
Variables ¶
View Source
var ( ErrGetKeySize = errors.New("failed to get needed key sizes") ErrGenerateKeypair = errors.New("failed to generate key pair") ErrInvalidType = errors.NewWithCode(errors.InvalidParameter, "invalid key type specified") ErrOutOfMemory = errors.NewWithCode(errors.NoMemory, "key generator cannot allocate enough memory") // Deprecated: Since 0.14. Use ErrOutOfMemory instead. ErrOverflow = ErrOutOfMemory )
Errors returned by key generation.
View Source
var ( ErrGetSymmetricKeySize = errors.New("failed to get symmetric key size") ErrGenerateSymmetricKey = errors.New("failed to generate symmetric key") )
Errors returned by key generation.
Functions ¶
This section is empty.
Types ¶
type Keypair ¶
type Keypair struct { Private *PrivateKey Public *PublicKey }
Keypair stores a ECDSA or RSA key pair.
type PrivateKey ¶
type PrivateKey struct {
Value []byte
}
PrivateKey stores a ECDSA or RSA private key.
type SymmetricKey ¶ added in v0.13.0
type SymmetricKey struct {
Value []byte
}
SymmetricKey stores a master key for Secure Cell.
func NewSymmetricKey ¶ added in v0.13.0
func NewSymmetricKey() (*SymmetricKey, error)
NewSymmetricKey generates a new random symmetric key.
Click to show internal directories.
Click to hide internal directories.