Documentation ¶
Index ¶
- Constants
- func CloseBackingImage(uuid string) error
- func DeviceEncryptionStatus(devicePath string) (mappedDevice, mapper string, err error)
- func EncryptBackingImage(devicePath, passphrase string, cryptoParams *EncryptParams) error
- func IsEncryptedDeviceOpened(device string) (bool, error)
- func OpenBackingImage(devicePath, passphrase, uuid string) error
- type EncryptParams
Constants ¶
View Source
const ( MapperFilePathPrefix = "/dev/mapper" CryptoKeyDefaultCipher = "aes-xts-plain64" CryptoKeyDefaultHash = "sha256" CryptoKeyDefaultSize = "256" CryptoDefaultPBKDF = "argon2i" )
Variables ¶
This section is empty.
Functions ¶
func CloseBackingImage ¶
CloseBackingImage closes encrypted backing image so it can be detached.
func DeviceEncryptionStatus ¶
DeviceEncryptionStatus looks to identify if the passed device is a LUKS mapping and if so what the device is and the mapper name as used by LUKS. If not, just returns the original device and an empty string.
func EncryptBackingImage ¶
func EncryptBackingImage(devicePath, passphrase string, cryptoParams *EncryptParams) error
EncryptBackingImage encrypts provided device with LUKS.
func IsEncryptedDeviceOpened ¶
IsEncryptedDeviceOpened determines if encrypted device is already open.
func OpenBackingImage ¶
OpenBackingImage opens backing image so that it can be used by the client.
Types ¶
type EncryptParams ¶
type EncryptParams struct { KeyProvider string KeyCipher string KeyHash string KeySize string PBKDF string }
EncryptParams keeps the customized cipher options from the secret CR
func NewEncryptParams ¶
func NewEncryptParams(keyProvider, keyCipher, keyHash, keySize, pbkdf string) *EncryptParams
func (*EncryptParams) GetKeyCipher ¶
func (cp *EncryptParams) GetKeyCipher() string
func (*EncryptParams) GetKeyHash ¶
func (cp *EncryptParams) GetKeyHash() string
func (*EncryptParams) GetKeySize ¶
func (cp *EncryptParams) GetKeySize() string
func (*EncryptParams) GetPBKDF ¶
func (cp *EncryptParams) GetPBKDF() string
Click to show internal directories.
Click to hide internal directories.