Documentation
¶
Overview ¶
Package encryption provides abstraction level for various disk encryption methods.
Index ¶
Constants ¶
View Source
const ( // LUKS2 encryption. LUKS2 = "luks2" // Unknown unecrypted or unsupported encryption. Unknown = "unknown" )
View Source
const AnyKeyslot = -1
AnyKeyslot tells providers to pick any keyslot.
Variables ¶
View Source
var ( // ErrEncryptionKeyRejected triggered when encryption key does not match. ErrEncryptionKeyRejected = fmt.Errorf("encryption key rejected") // ErrDeviceBusy returned when mapped device is still in use. ErrDeviceBusy = fmt.Errorf("mapped device is still in use") // ErrTokenNotFound returned when trying to get/delete not existing token. ErrTokenNotFound = fmt.Errorf("no token with supplied id exists") )
Functions ¶
This section is empty.
Types ¶
type Provider ¶
type Provider interface {
TokenProvider
Encrypt(devname string, key *Key) error
Open(devname, mappedName string, key *Key) (string, error)
Close(devname string) error
AddKey(devname string, key, newKey *Key) error
SetKey(devname string, key, newKey *Key) error
CheckKey(devname string, key *Key) (bool, error)
RemoveKey(devname string, slot int, key *Key) error
ReadKeyslots(deviceName string) (*Keyslots, error)
}
Provider represents encryption utility methods.
Click to show internal directories.
Click to hide internal directories.