Documentation ¶
Overview ¶
Package ncrypt provides wrappers around ncrypt.h functions. https://docs.microsoft.com/en-us/windows/win32/api/ncrypt/
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SignHash ¶
func SignHash(priv windows.Handle, pub crypto.PublicKey, digest []byte, opts crypto.SignerOpts) ([]byte, error)
SignHash is a wrapper for the NCryptSignHash function that supports only a subset of well-supported cryptographic primitives.
Signature algorithms: ECDSA, RSA. Hash functions: SHA-256. RSA schemes: RSASSA-PKCS1 and RSASSA-PSS.
https://docs.microsoft.com/en-us/windows/win32/api/ncrypt/nf-ncrypt-ncryptsignhash
Types ¶
type Key ¶
type Key struct {
// contains filtered or unexported fields
}
Key is a wrapper around the certificate store and context that uses it to implement signing-related methods with CryptoNG functionality.
func Cred ¶
Cred returns a Key wrapping the first valid certificate in the system store matching a given issuer string.
func (*Key) CertificateChain ¶
CertificateChain returns the credential as a raw X509 cert chain. This contains the public key.