Platforms to show: All Mac Windows Linux Cross-Platform

PKeyMBS class

Type Topic Plugin Version macOS Windows Linux iOS Targets
class Encryption and Hash MBS Encryption Plugin 17.0 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
The class for a public/private key.

Currently this class only implements a part of the PKey functionality of OpenSSL. If needed, we could add more.
This is an abstract class. You can't create an instance, but you can get one from various plugin functions.

Extended Key Usage

Constant Value Description
kExtendedKeyUsageAnyEKU &h100 Any Extended Key Usage (not recommended)
kExtendedKeyUsageCodeSign 8 Code Signing
kExtendedKeyUsageDVCS &h80 Data Validation and Certification Server
kExtendedKeyUsageOCSPSign &h20 OCSP Responder Signing
kExtendedKeyUsageSGC &h10 Server-Gated Cryptography (obsolete — old SSL export-grade hack)
kExtendedKeyUsageSMime 4 Secure Email (S/MIME)
kExtendedKeyUsageSSLClient 2 TLS/SSL Client Authentication
kExtendedKeyUsageSSLServer 1 TLS/SSL Server Authentication
kExtendedKeyUsageTimeStamp &h40 Trusted Timestamping

Key Usage

Constant Value Description
kKeyUsageCrlSign &h0002 The key can sign CRLs (Certificate Revocation Lists).
kKeyUsageDataEncipherment &h0010 The key can be used for encrypting application data directly (rare in TLS).
kKeyUsageDecipherOnly &h8000 The key can only be used for decipherment in key agreement (when kKeyUsageKeyAgreement is also set).
kKeyUsageDigitalSignature &h0080 The key can be used to verify digital signatures (TLS handshake, signed data, etc).
kKeyUsageEncipherOnly &h0001 The key can only be used for encipherment in key agreement (when kKeyUsageKeyAgreement is also set).
kKeyUsageKeyAgreement &h0008 The key can be used for key agreement protocols (e.g., Diffie-Hellman, ECDH).
kKeyUsageKeyCertSign &h0004 The key can sign other certificates (CA usage).
kKeyUsageKeyEncipherment &h0020 The key can be used for encrypting other keys (e.g., in RSA TLS key exchange).
kKeyUsageNonRepudiation &h0040 The key can be used for non-repudiation/signing where proof is required. Rarely used today.

This class has no sub classes.

Blog Entries

Xojo Developer Magazine

Videos

Release notes

  • Version 25.5
    • Changed GenerateRootCertificate method in PKeyMBS class to take SignCertificateParametersMBS object for parameters.
    • Changed SignCertificate method in PKeyMBS class to take SignCertificateParametersMBS for all the parameters.
  • Version 25.4
    • Changed Serialnumber parameter to Int64 for SignCertificateSigning and GenerateRootCertificate methods in PKeyMBS class.
  • Version 25.3
    • Added SignCertificateSigning, GenerateRootCertificate and GenerateCertificateSigningRequest methods for PKeyMBS class.
  • Version 18.4
  • Version 17.0
    • Added X509MBS and PKeyMBS class for reading details from certificates.

Some methods using this class:

Some properties using for this class:

Some examples using this class:

Some related classes:


The items on this page are in the following plugins: MBS Encryption Plugin.


PictureWriterMBS   -   PNGOptimizerMBS


The biggest plugin in space...