privatekey

package
v3.55.0 Latest Latest
Warning

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

Go to latest
Published: Sep 11, 2023 License: AGPL-3.0 Imports: 24 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNotSupported = errors.New("key type not supported")
	ErrEncryptedKey = errors.New("key is encrypted")
)
View Source
var (
	ErrUncrackable = errors.New("unable to crack encryption")
)

Functions

func FingerprintPEMKey

func FingerprintPEMKey(parsedKey any) (string, error)

Types

type DriftwoodResult

type DriftwoodResult struct {
	CertificateResults []struct {
		CertificateFingerprint string    `json:"CertificateFingerprint"`
		ExpirationTimestamp    time.Time `json:"ExpirationTimestamp"`
	} `json:"CertificateResults"`
	GitHubSSHResults []struct {
		Username string `json:"Username"`
	} `json:"GitHubSSHResults"`
}

type Scanner

type Scanner struct {
	IncludeExpired bool
}

func (Scanner) FromData

func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) ([]detectors.Result, error)

FromData will find and optionally verify Privatekey secrets in a given set of bytes.

func (Scanner) Keywords

func (s Scanner) Keywords() []string

Keywords are used for efficiently pre-filtering chunks. Use identifiers in the secret preferably, or the provider name.

func (Scanner) Type added in v3.27.0

func (s Scanner) Type() detectorspb.DetectorType

Jump to

Keyboard shortcuts

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