strength
import "github.com/TheManticoreProject/Manticore/windows/keycredentiallink/key/strength"
Index
type KeyStrength
KeyStrength specifies the strength of the NGC key. See: https://msdn.microsoft.com/en-us/library/mt220496.aspx
type KeyStrength uint32
const (
// Key strength is unknown.
KeyStrength_Unknown KeyStrength = 0x00
// Key strength is weak.
KeyStrength_Weak KeyStrength = 0x01
// Key strength is normal.
KeyStrength_Normal KeyStrength = 0x02
)
func (*KeyStrength) Marshal
func (ks *KeyStrength) Marshal() ([]byte, error)
Marshal returns the raw bytes of the KeyStrength structure.
Returns: - A byte slice representing the raw bytes of the KeyStrength structure. - An error if the conversion fails.
func (KeyStrength) String
func (ks KeyStrength) String() string
func (*KeyStrength) Unmarshal
func (ks *KeyStrength) Unmarshal(data []byte) (int, error)
Unmarshal parses the provided byte slice into the KeyStrength structure.
Parameters: - value: A byte slice containing the raw key strength to be parsed.
Returns: - The number of bytes read from the data. - An error if the parsing fails, otherwise nil.
Note: The function expects the byte slice to contain a 4-byte unsigned integer representing the key strength. It extracts the key strength value from the byte slice and assigns it to the KeyStrength structure.