github.com/projectdiscovery/nuclei/v2@v2.9.15/pkg/templates/signer/options.go (about)

     1  package signer
     2  
     3  import (
     4  	"errors"
     5  	"math/big"
     6  	"regexp"
     7  )
     8  
     9  type AlgorithmType uint8
    10  
    11  const (
    12  	RSA AlgorithmType = iota
    13  	ECDSA
    14  )
    15  
    16  type Options struct {
    17  	PrivateKeyName string
    18  	PrivateKeyData []byte
    19  	PassphraseName string
    20  	PassphraseData []byte
    21  	PublicKeyName  string
    22  	PublicKeyData  []byte
    23  	Algorithm      AlgorithmType
    24  }
    25  
    26  type EcdsaSignature struct {
    27  	R *big.Int
    28  	S *big.Int
    29  }
    30  
    31  var (
    32  	ReDigest            = regexp.MustCompile(`(?m)^#\sdigest:\s.+$`)
    33  	ErrUnknownAlgorithm = errors.New("unknown algorithm")
    34  )