Documentation ¶
Index ¶
- Constants
- type Manifest
- func (s *Manifest) BPKeyOffset() uint64
- func (s *Manifest) BPKeyTotalSize() uint64
- func (s *Manifest) GetStructInfo() bg.StructInfo
- func (s *Manifest) KMIDOffset() uint64
- func (s *Manifest) KMIDTotalSize() uint64
- func (s *Manifest) KMSVNOffset() uint64
- func (s *Manifest) KMSVNTotalSize() uint64
- func (s *Manifest) KMVersionOffset() uint64
- func (s *Manifest) KMVersionTotalSize() uint64
- func (s *Manifest) KeyAndSignatureOffset() uint64
- func (s *Manifest) KeyAndSignatureTotalSize() uint64
- func (s *Manifest) PrettyString(depth uint, withHeader bool, opts ...pretty.Option) string
- func (m *Manifest) Print()
- func (s *Manifest) ReadDataFrom(r io.Reader) (int64, error)
- func (s *Manifest) ReadFrom(r io.Reader) (int64, error)
- func (s *Manifest) Rehash()
- func (s *Manifest) RehashRecursive()
- func (m *Manifest) SetSignature(algo bg.Algorithm, privKey crypto.Signer, signedData []byte) error
- func (s *Manifest) SetStructInfo(newStructInfo bg.StructInfo)
- func (s *Manifest) StructInfoOffset() uint64
- func (s *Manifest) StructInfoTotalSize() uint64
- func (s *Manifest) TotalSize() uint64
- func (s *Manifest) Validate() error
- func (m *Manifest) ValidateBPMKey(bpmKS bg.KeySignature) error
- func (s *Manifest) WriteTo(w io.Writer) (int64, error)
Constants ¶
const StructureIDManifest = "__KEYM__"
StructureIDManifest is the StructureID (in terms of the document #575623) of element 'Manifest'.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Manifest ¶
type Manifest struct { bg.StructInfo `id:"__KEYM__" version:"0x10"` KMVersion uint8 `json:"kmVersion"` KMSVN bg.SVN `json:"kmSVN"` KMID uint8 `json:"kmID"` BPKey bg.HashStructure `json:"kmBPKey"` KeyAndSignature bg.KeySignature `json:"kmKeySignature"` }
PrettyString: BG Key Manifest
func NewManifest ¶
func NewManifest() *Manifest
NewManifest returns a new instance of Manifest with all default values set.
func (*Manifest) BPKeyOffset ¶
BPKeyOffset returns the offset in bytes of field BPKey
func (*Manifest) BPKeyTotalSize ¶
BPKeySize returns the size in bytes of the value of field BPKey
func (*Manifest) GetStructInfo ¶
func (s *Manifest) GetStructInfo() bg.StructInfo
GetStructInfo returns current value of StructInfo of the structure.
StructInfo is a set of standard fields with presented in any element ("element" in terms of document #575623).
func (*Manifest) KMIDOffset ¶
KMIDOffset returns the offset in bytes of field KMID
func (*Manifest) KMIDTotalSize ¶
KMIDSize returns the size in bytes of the value of field KMID
func (*Manifest) KMSVNOffset ¶
KMSVNOffset returns the offset in bytes of field KMSVN
func (*Manifest) KMSVNTotalSize ¶
KMSVNSize returns the size in bytes of the value of field KMSVN
func (*Manifest) KMVersionOffset ¶
KMVersionOffset returns the offset in bytes of field KMVersion
func (*Manifest) KMVersionTotalSize ¶
KMVersionSize returns the size in bytes of the value of field KMVersion
func (*Manifest) KeyAndSignatureOffset ¶
KeyAndSignatureOffset returns the offset in bytes of field KeyAndSignature
func (*Manifest) KeyAndSignatureTotalSize ¶
KeyAndSignatureSize returns the size in bytes of the value of field KeyAndSignature
func (*Manifest) PrettyString ¶
PrettyString returns the content of the structure in an easy-to-read format.
func (*Manifest) ReadDataFrom ¶
ReadDataFrom reads the Manifest from 'r' excluding StructInfo, in format defined in the document #575623.
func (*Manifest) ReadFrom ¶
ReadFrom reads the Manifest from 'r' in format defined in the document #575623.
func (*Manifest) Rehash ¶
func (s *Manifest) Rehash()
Rehash sets values which are calculated automatically depending on the rest data. It is usually about the total size field of an element.
func (*Manifest) RehashRecursive ¶
func (s *Manifest) RehashRecursive()
RehashRecursive calls Rehash (see below) recursively.
func (*Manifest) SetSignature ¶
func (*Manifest) SetStructInfo ¶
func (s *Manifest) SetStructInfo(newStructInfo bg.StructInfo)
SetStructInfo sets new value of StructInfo to the structure.
StructInfo is a set of standard fields with presented in any element ("element" in terms of document #575623).
func (*Manifest) StructInfoOffset ¶
StructInfoOffset returns the offset in bytes of field StructInfo
func (*Manifest) StructInfoTotalSize ¶
StructInfoSize returns the size in bytes of the value of field StructInfo
func (*Manifest) Validate ¶
Validate (recursively) checks the structure if there are any unexpected values. It returns an error if so.
func (*Manifest) ValidateBPMKey ¶
func (m *Manifest) ValidateBPMKey(bpmKS bg.KeySignature) error