Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CryptSetup ¶
type CryptSetup struct {
// contains filtered or unexported fields
}
CryptSetup manages encrypted devices.
func NewCryptSetup ¶
func NewCryptSetup() CryptSetup
func (CryptSetup) Init ¶
func (c CryptSetup) Init(devicePath string) (Device, error)
Init opens a crypt device by device path.
func (CryptSetup) InitByName ¶
func (c CryptSetup) InitByName(name string) (Device, error)
InitByName opens an active crypt device using its mapped name.
type CryptSetupClient ¶
type Device ¶
type Device interface { Format(cryptsetup.DeviceType, cryptsetup.GenericParams) error KeyslotAddByVolumeKey(int, string, string) error ActivateByVolumeKey(deviceName string, volumeKey string, volumeKeySize int, flags int) error ActivateByPassphrase(deviceName string, keyslot int, passphrase string, flags int) error VolumeKeyGet(keyslot int, passphrase string) ([]byte, int, error) Load(cryptsetup.DeviceType) error Free() bool Dump() int Type() string Deactivate(string) error }
type LuksDevice ¶
func NewLuksDevice ¶
func NewLuksDevice(crypt CryptSetupClient, path string) (LuksDevice, error)
func NewLuksDeviceByName ¶
func NewLuksDeviceByName(crypt CryptSetupClient, name string) (LuksDevice, error)
Click to show internal directories.
Click to hide internal directories.