keys

package
v1.0.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 6, 2025 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BCRYPT_DSA_PRIVATE_KEY

type BCRYPT_DSA_PRIVATE_KEY struct {
	// Magic is the magic signature of the key.
	Magic magic.BCRYPT_KEY_BLOB

	// Header is the header of the key.
	Header headers.BCRYPT_DSA_KEY_BLOB

	// Content is the content of the key.
	Content blob.BCRYPT_DSA_PRIVATE_BLOB
}

func (*BCRYPT_DSA_PRIVATE_KEY) Describe

func (k *BCRYPT_DSA_PRIVATE_KEY) Describe(indent int)

Describe prints a detailed description of the BCRYPT_DSA_PRIVATE_KEY structure.

Parameters: - indent: An integer representing the indentation level for the printed output.

Note: The function prints the Header and Data of the BCRYPT_DSA_PRIVATE_KEY structure. The output is formatted with the specified indentation level to improve readability.

func (*BCRYPT_DSA_PRIVATE_KEY) Marshal

func (k *BCRYPT_DSA_PRIVATE_KEY) Marshal() ([]byte, error)

Marshal returns the raw bytes of the BCRYPT_DSA_PRIVATE_KEY structure.

Returns: - A byte slice representing the raw bytes of the BCRYPT_DSA_PRIVATE_KEY structure.

func (*BCRYPT_DSA_PRIVATE_KEY) Unmarshal

func (k *BCRYPT_DSA_PRIVATE_KEY) Unmarshal(value []byte) (int, error)

Unmarshal parses the provided byte slice into the BCRYPT_DSA_PRIVATE_KEY structure.

Parameters: - value: A byte slice containing the raw DSA PRIVATE key to be parsed.

Returns: - The number of bytes read from the byte slice. - An error if the parsing fails, otherwise nil.

Note: The function expects the byte slice to follow the RSA PRIVATE key format, starting with the BCRYPT_RSA_KEY_BLOB header. It extracts the PRIVATE exponent and modulus from the byte slice and stores them in the BCRYPT_DSA_PRIVATE_KEY structure.

type BCRYPT_DSA_PUBLIC_KEY

type BCRYPT_DSA_PUBLIC_KEY struct {
	// Magic is the magic signature of the key.
	Magic magic.BCRYPT_KEY_BLOB

	// Header is the header of the key.
	Header headers.BCRYPT_DSA_KEY_BLOB

	// Content is the content of the key.
	Content blob.BCRYPT_DSA_PUBLIC_BLOB
}

func (*BCRYPT_DSA_PUBLIC_KEY) Describe

func (k *BCRYPT_DSA_PUBLIC_KEY) Describe(indent int)

Describe prints a detailed description of the BCRYPT_DSA_PUBLIC_KEY structure.

Parameters: - indent: An integer representing the indentation level for the printed output.

Note: The function prints the Header and Data of the BCRYPT_DSA_PUBLIC_KEY structure. The output is formatted with the specified indentation level to improve readability.

func (*BCRYPT_DSA_PUBLIC_KEY) Marshal

func (k *BCRYPT_DSA_PUBLIC_KEY) Marshal() ([]byte, error)

Marshal returns the raw bytes of the BCRYPT_DSA_PUBLIC_KEY structure.

Returns: - A byte slice representing the raw bytes of the BCRYPT_DSA_PUBLIC_KEY structure.

func (*BCRYPT_DSA_PUBLIC_KEY) Unmarshal

func (k *BCRYPT_DSA_PUBLIC_KEY) Unmarshal(value []byte) (int, error)

Unmarshal parses the provided byte slice into the BCRYPT_DSA_PUBLIC_KEY structure.

Parameters: - value: A byte slice containing the raw DSA public key to be parsed.

Returns: - The number of bytes read from the byte slice. - An error if the parsing fails, otherwise nil.

Note: The function expects the byte slice to follow the RSA public key format, starting with the BCRYPT_RSA_KEY_BLOB header. It extracts the public exponent and modulus from the byte slice and stores them in the BCRYPT_DSA_PUBLIC_KEY structure.

type BCRYPT_RSAPRIVATE_KEY

type BCRYPT_RSAPRIVATE_KEY struct {
	// Magic is the magic signature of the key.
	Magic magic.BCRYPT_KEY_BLOB

	// Header is the header of the key.
	Header headers.BCRYPT_RSA_KEY_BLOB

	// Content is the content of the key.
	Content blob.BCRYPT_RSA_PRIVATE_BLOB
}

func (*BCRYPT_RSAPRIVATE_KEY) Describe

func (k *BCRYPT_RSAPRIVATE_KEY) Describe(indent int)

Describe prints a detailed description of the BCRYPT_RSAPRIVATE_KEY structure.

Parameters: - indent: An integer representing the indentation level for the printed output.

Note: The function prints the Header and Data of the BCRYPT_RSAPRIVATE_KEY structure. The output is formatted with the specified indentation level to improve readability.

func (*BCRYPT_RSAPRIVATE_KEY) Marshal

func (k *BCRYPT_RSAPRIVATE_KEY) Marshal() ([]byte, error)

Marshal returns the raw bytes of the BCRYPT_RSAPRIVATE_KEY structure.

Returns: - A byte slice representing the raw bytes of the BCRYPT_RSAPRIVATE_KEY structure.

func (*BCRYPT_RSAPRIVATE_KEY) Unmarshal

func (k *BCRYPT_RSAPRIVATE_KEY) Unmarshal(value []byte) (int, error)

Unmarshal parses the provided byte slice into the BCRYPT_RSAPRIVATE_KEY structure.

Parameters: - value: A byte slice containing the raw RSA private key to be parsed.

Returns: - The number of bytes read from the byte slice. - An error if the parsing fails, otherwise nil.

Note: The function expects the byte slice to follow the RSA private key format, starting with the BCRYPT_RSA_KEY_BLOB header. It extracts the public exponent, modulus, prime1, and prime2 from the byte slice and stores them in the BCRYPT_RSAPRIVATE_KEY structure.

type BCRYPT_RSAPUBLIC_KEY

type BCRYPT_RSAPUBLIC_KEY struct {
	// Magic is the magic signature of the key.
	Magic magic.BCRYPT_KEY_BLOB

	// Header is the header of the key.
	Header headers.BCRYPT_RSA_KEY_BLOB

	// Content is the content of the key.
	Content blob.BCRYPT_RSA_PUBLIC_BLOB
}

func (*BCRYPT_RSAPUBLIC_KEY) Describe

func (k *BCRYPT_RSAPUBLIC_KEY) Describe(indent int)

Describe prints a detailed description of the BCRYPT_RSAPUBLIC_KEY structure.

Parameters: - indent: An integer representing the indentation level for the printed output.

Note: The function prints the Header and Data of the BCRYPT_RSAPUBLIC_KEY structure. The output is formatted with the specified indentation level to improve readability.

func (*BCRYPT_RSAPUBLIC_KEY) Marshal

func (k *BCRYPT_RSAPUBLIC_KEY) Marshal() ([]byte, error)

Marshal returns the raw bytes of the BCRYPT_RSAPUBLIC_KEY structure.

Returns: - A byte slice representing the raw bytes of the BCRYPT_RSAPUBLIC_KEY structure.

func (*BCRYPT_RSAPUBLIC_KEY) Unmarshal

func (k *BCRYPT_RSAPUBLIC_KEY) Unmarshal(value []byte) (int, error)

Unmarshal parses the provided byte slice into the BCRYPT_RSAPUBLIC_KEY structure.

Parameters: - value: A byte slice containing the raw RSA public key to be parsed.

Returns: - The number of bytes read from the byte slice. - An error if the parsing fails, otherwise nil.

Note: The function expects the byte slice to follow the RSA public key format, starting with the BCRYPT_RSA_KEY_BLOB header. It extracts the public exponent and modulus from the byte slice and stores them in the BCRYPT_RSAPUBLIC_KEY structure.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL