Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrUnsupportedCryptsetupVersion is the error raised when the available version // of cryptsetup is not compatible with the Singularity encryption mechanism. ErrUnsupportedCryptsetupVersion = errors.New("installed version of cryptsetup is not supported, >=2.0.0 required") // ErrInvalidPassphrase raised when the passed key is not valid to open requested // encrypted device. ErrInvalidPassphrase = errors.New("no key available with this passphrase") )
Pre-defined error(s)
Functions ¶
This section is empty.
Types ¶
type Device ¶
type Device struct{}
Device describes a crypt device
func (*Device) CloseCryptDevice ¶
CloseCryptDevice closes the crypt device
func (*Device) EncryptFilesystem ¶
EncryptFilesystem takes the path to a file containing a non-encrypted filesystem, encrypts it using the provided key, and returns a path to a file that can be later used as an encrypted volume with cryptsetup. NOTE: it is the callers responsibility to remove the returned file that contains the crypt header.
Click to show internal directories.
Click to hide internal directories.