Documentation ¶
Index ¶
- type CryptoSigner
- type ECDSASigner
- func GetECDSAP256Signer(privKey *ecdsa.PrivateKey) *ECDSASigner
- func GetECDSAP384Signer(privKey *ecdsa.PrivateKey) *ECDSASigner
- func GetECDSAP521Signer(privKey *ecdsa.PrivateKey) *ECDSASigner
- func GetECDSASecp256k1Signer(privKey *ecdsa.PrivateKey) *ECDSASigner
- func NewECDSAP256Signer() (*ECDSASigner, error)
- func NewECDSAP384Signer() (*ECDSASigner, error)
- func NewECDSAP521Signer() (*ECDSASigner, error)
- func NewECDSASecp256k1Signer() (*ECDSASigner, error)
- func NewECDSASigner(curve elliptic.Curve) (*ECDSASigner, error)
- type Ed25519Signer
- type PS256Signer
- type RS256Signer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CryptoSigner ¶
type CryptoSigner struct { PubKeyBytes []byte PubKey interface{} // contains filtered or unexported fields }
CryptoSigner defines signer based on crypto.
func NewCryptoSigner ¶
func NewCryptoSigner(crypto cryptoapi.Crypto, kms kmsapi.KeyManager, keyType kmsapi.KeyType) (*CryptoSigner, error)
NewCryptoSigner creates a new CryptoSigner.
func (*CryptoSigner) PublicKey ¶
func (s *CryptoSigner) PublicKey() interface{}
PublicKey returns a public key object (e.g. ed25519.VerificationMethod or *ecdsa.PublicKey).
func (*CryptoSigner) PublicKeyBytes ¶
func (s *CryptoSigner) PublicKeyBytes() []byte
PublicKeyBytes returns bytes of the public key.
type ECDSASigner ¶
ECDSASigner makes ECDSA based signatures.
func GetECDSAP256Signer ¶
func GetECDSAP256Signer(privKey *ecdsa.PrivateKey) *ECDSASigner
GetECDSAP256Signer creates a new ECDSA P256 signer with passed ECDSA P256 private key.
func GetECDSAP384Signer ¶
func GetECDSAP384Signer(privKey *ecdsa.PrivateKey) *ECDSASigner
GetECDSAP384Signer creates a new ECDSA P384 signer with passed ECDSA P384 private key.
func GetECDSAP521Signer ¶
func GetECDSAP521Signer(privKey *ecdsa.PrivateKey) *ECDSASigner
GetECDSAP521Signer creates a new ECDSA P521 signer with passed ECDSA P521 private key.
func GetECDSASecp256k1Signer ¶
func GetECDSASecp256k1Signer(privKey *ecdsa.PrivateKey) *ECDSASigner
GetECDSASecp256k1Signer creates a new ECDSA Secp256k1 signer with passed ECDSA Secp256k1 private key.
func NewECDSAP256Signer ¶
func NewECDSAP256Signer() (*ECDSASigner, error)
NewECDSAP256Signer creates a new ECDSA P256 signer with generated key.
func NewECDSAP384Signer ¶
func NewECDSAP384Signer() (*ECDSASigner, error)
NewECDSAP384Signer creates a new ECDSA P384 signer with generated key.
func NewECDSAP521Signer ¶
func NewECDSAP521Signer() (*ECDSASigner, error)
NewECDSAP521Signer creates a new ECDSA P521 signer with generated key.
func NewECDSASecp256k1Signer ¶
func NewECDSASecp256k1Signer() (*ECDSASigner, error)
NewECDSASecp256k1Signer creates a new ECDSA Secp256k1 signer with generated key.
func NewECDSASigner ¶
func NewECDSASigner(curve elliptic.Curve) (*ECDSASigner, error)
NewECDSASigner creates a new ECDSA signer based on the input elliptic curve.
func (*ECDSASigner) PublicKey ¶
func (es *ECDSASigner) PublicKey() interface{}
PublicKey returns a public key object (*ecdsa.PublicKey).
func (*ECDSASigner) PublicKeyBytes ¶
func (es *ECDSASigner) PublicKeyBytes() []byte
PublicKeyBytes returns bytes of the public key.
type Ed25519Signer ¶
Ed25519Signer makes Ed25519 based signatures.
func GetEd25519Signer ¶
func GetEd25519Signer(privKey ed25519.PrivateKey, pubKey ed25519.PublicKey) *Ed25519Signer
GetEd25519Signer creates a new Ed25519 signer with passed Ed25519 key pair.
func NewEd25519Signer ¶
func NewEd25519Signer() (*Ed25519Signer, error)
NewEd25519Signer creates a new Ed25519 signer with generated key.
func (*Ed25519Signer) PublicKey ¶
func (s *Ed25519Signer) PublicKey() interface{}
PublicKey returns a public key object (ed25519.VerificationMethod).
func (*Ed25519Signer) PublicKeyBytes ¶
func (s *Ed25519Signer) PublicKeyBytes() []byte
PublicKeyBytes returns bytes of the public key.
type PS256Signer ¶
type PS256Signer struct {
// contains filtered or unexported fields
}
PS256Signer makes PS256 based signatures.
func GetPS256Signer ¶
func GetPS256Signer(privKey *rsa.PrivateKey) *PS256Signer
GetPS256Signer creates a new PS256 signer with provided RSA private key.
func NewPS256Signer ¶
func NewPS256Signer() (*PS256Signer, error)
NewPS256Signer creates a new PS256 signer with generated key.
func (*PS256Signer) PublicKeyBytes ¶
func (s *PS256Signer) PublicKeyBytes() []byte
type RS256Signer ¶
type RS256Signer struct {
// contains filtered or unexported fields
}
RS256Signer makes RS256 based signatures.
func GetRS256Signer ¶
func GetRS256Signer(privKey *rsa.PrivateKey) *RS256Signer
GetRS256Signer creates a new RS256 signer with provided RSA private key.
func NewRS256Signer ¶
func NewRS256Signer() (*RS256Signer, error)
NewRS256Signer creates a new RS256 signer with generated key.
func (*RS256Signer) PublicKeyBytes ¶
func (s *RS256Signer) PublicKeyBytes() []byte