SecureKey is a public wrapper for the internal ncrypt implementation.
type SecureKey struct {
// contains filtered or unexported fields
}
func NewSecureKey(issuer string, store string, provider string) (*SecureKey, error)
NewSecureKey returns a handle to the first available certificate and private key pair in the specified Windows key store matching the filters.
func (sk *SecureKey) CertificateChain() [][]byte
CertificateChain returns the SecureKey's raw X509 cert chain. This contains the public key.
func (sk *SecureKey) Close()
Close frees up resources associated with the underlying key.
func (sk *SecureKey) Public() crypto.PublicKey
Public returns the public key for this SecureKey.
func (sk *SecureKey) Sign(_ io.Reader, digest []byte, opts crypto.SignerOpts) (signed []byte, err error)
Sign signs a message digest, using the specified signer options.