package
0.0.2-beta
Repository: https://github.com/dfns/dfns-sdk-go.git
Documentation: pkg.go.dev

# README

credentials

import "github.com/dfns/dfns-sdk-go/credentials"

Index

type AsymmetricKeySigner

type AsymmetricKeySigner struct {
    *AsymmetricKeySignerConfig
}

func NewAsymmetricKeySigner

func NewAsymmetricKeySigner(config *AsymmetricKeySignerConfig) *AsymmetricKeySigner

NewAsymmetricKeySigner creates a new instance of AsymmetricKeySigner with the provided configuration.

func (*AsymmetricKeySigner) Sign

func (signer *AsymmetricKeySigner) Sign(userActionChallenge *credentials.UserActionChallenge) (*credentials.KeyAssertion, error)

Sign signs the given challenge using the private key and the hashing algorithm specified in the Algorithm field. If the Algorithm field is not set or invalid, it defaults to SHA256.

type AsymmetricKeySignerConfig

type AsymmetricKeySignerConfig struct {
    // PrivateKey holds the PEM-encoded private key used for signing.
    PrivateKey string
    // CredID is the identifier of the credential associated with the private key.
    CredID string
    // Algorithm specifies the hashing algorithm to use for signing. Defaults to SHA256 if not set.
    Algorithm *crypto.Hash
}

Generated by gomarkdoc

# Functions

NewAsymmetricKeySigner creates a new instance of AsymmetricKeySigner with the provided configuration.

# Structs

No description provided by the author
No description provided by the author