SecureBlackbox Lite 2020 Delphi Edition

Questions / Feedback?

CryptoKeyManager Component

Properties   Methods   Events   Configuration Settings   Errors  

The CryptoKeyManager component provides a simple way to load, generate and manage generic crypto keys.

Syntax

TsbiCryptoKeyManager

Remarks

CryptoKeyManager allows you to load, save, generate, import, and export low-level crypto keys. One example of such keys are raw RSA keys stored in PKCS1 format or AES256 keys. CryptoKeyManager supports asymmetric, symmetric, and HMAC keys.

CryptoKeyManager is a typical companion for low-level cryptography classes, such as PublicKeyCrypto, SymmetricCrypto, and HashFunction. It can also be used to provide external key material to certificate objects, and to derive cryptographic keys from passwords.

Use ImportBytes or ImportFromFile method to load the key material from a buffer or file. Use ImportFromCert (and remember to assign the certificate object to the Certificate property before calling it) to import a key from an X.509 certificate. Once loaded, the key will be available in the Key property.

To generate a new key or keypair use Generate method. You can export the generated key using ExportBytes or ExportToFile method. You can attach the generated or loaded key to an external certificate object using the ExportToCert method.

Note: CryptoKeyManager can only work with one cryptographic key at a time. Use CryptoKeyStorage to access media containing more than one key.

Property List


The following is the full list of the properties of the component with short descriptions. Click on the links for further details.

CertificateA container for the certificate object.
KeyThe key object that the manager is currently working with.

Method List


The following is the full list of the methods of the component with short descriptions. Click on the links for further details.

ConfigSets or retrieves a configuration setting.
DeriveKeyGenerates a strong cryptographic key from a password.
ExportBytesExports the key to a byte array.
ExportToCertExports the key to a certificate.
ExportToFileExports the key to a file.
ExportToStreamExports the key to a stream.
GenerateGenerates a new crypto key.
GetKeyParamReturns an algorithm-specific key parameter.
GetKeyParamStrReturns an algorithm-specific key parameter to a string.
ImportBytesLoads a key from a byte array.
ImportFromCertLoads a key from a certificate.
ImportFromFileLoads a key from a file.
ImportFromStreamLoads a key from a stream.
SetKeyParamSets an algorithm-specific key parameter.
SetKeyParamStrSets an algorithm-specific key parameter.

Event List


The following is the full list of the events fired by the component with short descriptions. Click on the links for further details.

ErrorInforms about an error during an operation.
NotificationThis event notifies the application about an underlying control flow event.
PasswordNeededThis event is fired when a decryption password is needed.

Configuration Settings


The following is a list of configuration settings for the component with short descriptions. Click on the links for further details.

Argon2MemoryCostSets the memory cost parameter of Argon2 key derivation algorithm.
Argon2ParallelismSets the parallelism parameter of Argon2 key derivation algorithm.
CurveThe name of the curve of the newly added elliptic cryptography (EC) key.
DerivationAlgorithmThe algorithm to use for key derivation.
DeriveIterationsThe number of iterations to use as part of key derivation routine.
HMACAlgorithmSpecifies the HMAC algorithm to use with the key derivation algorithm.
TempPathPath for storing temporary files.
TempPathPath for storing temporary files.

Copyright (c) 2022 /n software inc. - All rights reserved.
SecureBlackbox Lite 2020 Delphi Edition - Version 20.0 [Build 8166]