Versions in this module Expand all Collapse all v0 v0.0.17 Nov 12, 2022 v0.0.16 Nov 12, 2022 v0.0.15 Nov 12, 2022 v0.0.13 Nov 11, 2022 v0.0.12 Nov 11, 2022 v0.0.11 Nov 11, 2022 v0.0.10 Nov 11, 2022 v0.0.9 Nov 11, 2022 v0.0.8 Nov 11, 2022 v0.0.7 Nov 11, 2022 v0.0.6 Nov 11, 2022 v0.0.5 Nov 10, 2022 v0.0.4 Nov 10, 2022 v0.0.3 Nov 10, 2022 v0.0.2 Nov 10, 2022 v0.0.1 Nov 10, 2022 Changes in this version + const AnyId + const AnySlot + var ErrMissingCryptsetupFeature = errors.New(...) + func Activate(volumeName, sourceDevicePath string, key []byte) error + func AddKey(devicePath string, existingKey, key []byte, options *AddKeyOptions) error + func Deactivate(volumeName string) error + func Format(devicePath, label string, key []byte, opts *FormatOptions) error + func ImportToken(devicePath string, token Token, options *ImportTokenOptions) error + func KillSlot(devicePath string, slot int, key []byte) error + func RegisterTokenDecoder(typ TokenType, decoder TokenDecoder) + func RemoveToken(devicePath string, id int) error + func SetSlotPriority(devicePath string, slot int, priority SlotPriority) error + type AF struct + Hash Hash + Stripes int + Type AFType + type AFType string + const AFTypeLUKS1 + type AddKeyOptions struct + KDFOptions KDFOptions + Slot int + type Area struct + Encryption string + KeySize int + Offset uint64 + Size uint64 + Type AreaType + func (a *Area) UnmarshalJSON(data []byte) error + type AreaType string + const AreaTypeRaw + type Config struct + Flags []string + JSONSize uint64 + KeyslotsSize uint64 + Requirements []string + func (c *Config) UnmarshalJSON(data []byte) error + type Digest struct + Digest []byte + Hash Hash + Iterations int + Keyslots []int + Salt []byte + Segments []int + Type KDFType + func (d *Digest) UnmarshalJSON(data []byte) error + type Features int + const FeatureHeaderSizeSetting + const FeatureTokenImport + const FeatureTokenReplace + func DetectCryptsetupFeatures() Features + type FormatOptions struct + KDFOptions KDFOptions + KeyslotsAreaKiBSize int + MetadataKiBSize int + type GenericToken struct + Params map[string]interface{} + TokenKeyslots []int + TokenType TokenType + func (t *GenericToken) Keyslots() []int + func (t *GenericToken) MarshalJSON() ([]byte, error) + func (t *GenericToken) Type() TokenType + func (t *GenericToken) UnmarshalJSON(data []byte) error + type Hash string + const HashSHA1 + const HashSHA224 + const HashSHA256 + const HashSHA384 + const HashSHA512 + func (h Hash) GetHash() crypto.Hash + type HeaderInfo struct + HeaderSize uint64 + Label string + Metadata Metadata + func ReadHeader(path string, lockMode LockMode) (*HeaderInfo, error) + type ImportTokenOptions struct + Id int + Replace bool + type Integrity struct + JournalEncryption string + JournalIntegrity string + Type string + type JsonNumber string + func (n JsonNumber) Int() (int, error) + func (n JsonNumber) Uint64() (uint64, error) + type KDF struct + CPUs int + Hash Hash + Iterations int + Memory int + Salt []byte + Time int + Type KDFType + type KDFOptions struct + ForceIterations int + MemoryKiB int + Parallel int + TargetDuration time.Duration + type KDFType string + const KDFTypeArgon2i + const KDFTypeArgon2id + const KDFTypePBKDF2 + type Keyslot struct + AF *AF + Area *Area + KDF *KDF + KeySize int + Priority SlotPriority + Type KeyslotType + func (s *Keyslot) UnmarshalJSON(data []byte) error + type KeyslotType string + const KeyslotTypeLUKS2 + type LockMode int + const LockModeBlocking + const LockModeNonBlocking + type Metadata struct + Config Config + Digests map[int]*Digest + Keyslots map[int]*Keyslot + Segments map[int]*Segment + Tokens map[int]Token + func (m *Metadata) UnmarshalJSON(data []byte) error + type Segment struct + DynamicSize bool + Encryption string + Flags []string + IVTweak uint64 + Integrity *Integrity + Offset uint64 + SectorSize int + Size uint64 + Type string + func (s *Segment) UnmarshalJSON(data []byte) error + type SlotPriority int + const SlotPriorityHigh + const SlotPriorityIgnore + const SlotPriorityNormal + func (p SlotPriority) String() string + type Token interface + Keyslots func() []int + Type func() TokenType + type TokenDecoder func([]byte) (Token, error) + type TokenType string + const TokenTypeKeyring