PdfPkcs11DigitalId Class
Represents a digital ID that is stored on a cryptographic device accessible through PKCS#11 application programming interface called "Cryptoki".
public sealed class PdfPkcs11DigitalId : PdfDigitalId
Public NotInheritable Class PdfPkcs11DigitalId
Inherits PdfDigitalId
- Inheritance:
- System.ObjectPdfPkcs11DigitalId
Properties
Id
Gets the key identifier for public/private key pair (default empty) as hex encoded string.
Property Value
- System.String
The key identifier for public/private key pair (default empty) as hex encoded string.
Methods
CreateCertificate(String, Nullable<DateTimeOffset>, Nullable<DateTimeOffset>)
Creates a self-signed X.509 Public-Key certificate with a X.509 SubjectPublicKeyInfo structure to include in the certificate extracted from the PKCS#11 private key or public key associated with this GemBox.Cryptography.Pkcs11.Pkcs11DigitalId.
public PdfCertificate CreateCertificate(string subjectName = null, DateTimeOffset? notBefore = default(DateTimeOffset? ), DateTimeOffset? notAfter = default(DateTimeOffset? ))
Public Function CreateCertificate(subjectName As String = Nothing, notBefore As DateTimeOffset? = Nothing, notAfter As DateTimeOffset? = Nothing) As PdfCertificate
Parameters
subjectName
- System.String
The X.500 Distinguished Name to use as the Subject in a created certificate. If null, the value is extracted from the PKCS#11 private key or public key associated with this GemBox.Cryptography.Pkcs11.Pkcs11DigitalId or a predefined value is used.
notBefore
- System.Nullable<System.DateTimeOffset>
The oldest date and time when the certificate is considered valid. Typically System.DateTimeOffset.UtcNow, plus or minus a few seconds. If null, the value is extracted from the PKCS#11 private key or public key associated with this GemBox.Cryptography.Pkcs11.Pkcs11DigitalId or a predefined value is used.
notAfter
- System.Nullable<System.DateTimeOffset>
The date and time when the certificate is no longer considered valid. If null, the value is extracted from the PKCS#11 private key or public key associated with this GemBox.Cryptography.Pkcs11.Pkcs11DigitalId or a predefined value is used.
Returns
A created PdfCertificate or null if the creation was not successful.
Inherited Properties
Certificate | Gets or sets the certificate. (Inherited from PdfDigitalId) |
Inherited Methods
ToString() | Returns a System.String that represents this PdfDigitalId instance. (Inherited from PdfDigitalId) |