Documentation
¶
Index ¶
- Constants
- Variables
- func FileKey(path string) ([32]byte, error)
- func FindOffset(g *Group, e *Entry) int
- func NewBlockModeReader(bm cipher.BlockMode, r io.Reader) io.ReadCloser
- func NewBlockModeWriter(bm cipher.BlockMode, w io.Writer) io.WriteCloser
- func PasswordKey(password []byte) [32]byte
- func Protection(protectedStreamKey []byte) cipher.Stream
- func UpdateProtectedValues(f *File, newProtectedStreamKey [32]byte)
- func WriteFile(w io.Writer, f *File, key Key) error
- func WriteOptions(w io.Writer, opts Options) error
- type AutoTypeOptions
- type BinaryField
- type BinaryValue
- type Block
- type Bool
- type CompressionAlgorithm
- type CustomIcon
- type EncryptionAlgorithm
- type Entry
- type EntryTimes
- type File
- type Group
- type Header
- type HistoricEntry
- type Key
- type Meta
- type Options
- type PrefixReader
- type PrefixWriter
- type StringField
- type StringValue
Constants ¶
View Source
const ( EndOfHeader headerField = iota Comment CipherID CompressionFlags MasterSeed TransformSeed TransformRounds EncryptionIV ProtectedStreamKey StreamStartBytes InnerRandomStreamID )
Variables ¶
View Source
var ErrPadding = errors.New("invalid padding")
Functions ¶
func FindOffset ¶
func NewBlockModeReader ¶
func NewBlockModeWriter ¶
func PasswordKey ¶
func Protection ¶
func UpdateProtectedValues ¶
Types ¶
type AutoTypeOptions ¶
type BinaryField ¶
type BinaryField struct {
Key string
Value BinaryValue
}
type BinaryValue ¶
type CompressionAlgorithm ¶
type CompressionAlgorithm uint32
const ( CompressionAlgorithmNone CompressionAlgorithm = iota CompressionAlgorithmGZIP )
type CustomIcon ¶
type EncryptionAlgorithm ¶
type EncryptionAlgorithm uint32
const ( EncryptionNone EncryptionAlgorithm = iota EncryptionARC4 EncryptionSalsa20 )
type Entry ¶
type Entry struct {
UUID []byte
IconID int
ForegroundColor string
BackgroundColor string
OverrideURL string
Tags string
Times EntryTimes
String []StringField
Binary []BinaryField
AutoType AutoTypeOptions
History []*HistoricEntry `xml:"History>Entry"`
}
type EntryTimes ¶
type File ¶
type Group ¶
type Group struct {
UUID []byte
Name string
Notes string
IconID int
Times struct {
LastModificationTime time.Time
CreationTime time.Time
LastAccessTime time.Time
ExpiryTime time.Time
Expires Bool
UsageCount int
LocationChanged time.Time
}
IsExpanded Bool
DefaultAutoTypeSequence string
EnableAutoType string
EnableSearching string
LastTopVisibleEntry string
Group []*Group
Entry []*Entry
}
type HistoricEntry ¶
type HistoricEntry struct {
UUID []byte
IconID int
ForegroundColor string
BackgroundColor string
OverrideURL string
Tags string
Times EntryTimes
String []StringField
Binary []BinaryField
AutoType AutoTypeOptions
}
type Meta ¶
type Meta struct {
Generator string
HeaderHash []byte
DatabaseName string
DatabaseNameChanged time.Time
DatabaseDescription string
DatabaseDescriptionChanged time.Time
DefaultUserName string
DefaultUserNameChanged time.Time
MaintenanceHistoryDays int
Color string
MasterKeyChanged time.Time
MasterKeyChangeRec int
MasterKeyChangedForce int
MemoryProtection struct {
ProtectTitle Bool
ProtectUserName Bool
ProtectPassword Bool
ProtectURL Bool
ProtectNotes Bool
}
CustomIcons []CustomIcon
RecycleBinEnabled Bool
RecycleBinUUID []byte
RecycleBinChanged time.Time
EntryTemplatesGroup []byte
EntryTemplatesGroupChanged time.Time
LastSelectedGroup []byte
LastTopVisibleGroup []byte
HistoryMaxItems int
HistoryMaxSize int
Binaries string
CustomData string
}
type Options ¶
type Options struct {
Cipher uuid.UUID
CompressionAlgorithm
MasterSeed [32]byte
TransformSeed [32]byte
TransformRounds int64
EncryptionIV [16]byte
ProtectedStreamKey [32]byte
StreamStartBytes [32]byte
InnerRandomStreamID EncryptionAlgorithm
}
type PrefixReader ¶
type PrefixWriter ¶
type PrefixWriter struct {
// contains filtered or unexported fields
}
type StringField ¶
type StringField struct {
Key string
Value StringValue
}
type StringValue ¶
Source Files
¶
Click to show internal directories.
Click to hide internal directories.