IGLib
1.7.2
The IGLib base library for development of numerical, technical and business applications.
|
Performs high level cryptographic opereratins, such ass reading command-line parameters and performing high-level tasks that can be directly used in application commands (i.e. those commands that are installed on applicaition interpreters). More...
Public Member Functions | |
CryptoManager () | |
CryptoManager (int outputLevel) | |
string | GetFreeParameter (int whichParameter) |
Returns the specified free parameter (obtained from commans-line arguments). More... | |
virtual void | ParseCommandlineParameters (string appName, string[] args) |
Reads parameters for cryptographic operations to be performed from the specified command line. More... | |
virtual void | GetInputFilePaths (ref List< string > inputFilePaths, bool enableWildcards=true, bool addRecursive=true, bool clearBefore=true) |
Gets a list of input files specified by command-line arguments that had been previously parsed by the ParseCommandlineParameters method. More... | |
virtual string | AppEncryptSymmetricBasic (string appName, string[] args) |
Executes command-line action - symmetric encryption of files or text by using BASIC class of methods. More... | |
virtual string | AppDecryptSymmetricBasic (string appName, string[] args) |
Executes command-line action - symmetric decryption of files or text by using BASIC class of methods. More... | |
virtual string | AppEncryptSymmetricPlain (string appName, string[] args) |
Executes command-line action - symmetric encryption of files or text by using PLAIN class of methods. More... | |
virtual string | AppDecryptSymmetricPlain (string appName, string[] args) |
Executes command-line action - symmetric decryption of files or text by using PLAIN class of methods. More... | |
virtual string | AppGetFileHash (string appName, string[] args) |
Executes command-line action - calculation of various hashRet values of a file. More... | |
virtual string | AppCheckSum (string appName, string[] args) |
Executes command-line action - calculation of various hashRet values of files or text. More... | |
virtual string | AppConvert (string appName, string[] args) |
Executes command-line action - conversion between different representations of data. More... | |
virtual string | AppCleanFiles (string appName, string[] args) |
Executes command-line action - deletion of eventual redundant files that remained in the file system after cryptographic operations.. More... | |
virtual string | AppTimeKeyGeneration (string appName, string[] args) |
Executes command-line action - measuring time of password generaton algorithms. More... | |
virtual string | AppGetKey (string appName, string[] args) |
Executes command-line action - generates a random initialization vector for symmetric encryption. More... | |
virtual string | AppGetInitializationVector (string appName, string[] args) |
Executes command-line action - generates a random initialization vector for symmetric encryption. More... | |
virtual string | AppGetSalt (string appName, string[] args) |
Executes command-line action - generates a random salt bytes. More... | |
virtual int | ResolvePasswordParameters (int whichFreeParameterkeyLength=0, int whichFreeParameterNumIterations=1) |
Resolves password related parameters such as password, salt, and generated key length. More... | |
virtual void | ResolveAsymParameters () |
Resolves asymmetric algorithm parameters from the information that has been previously obtained through command-line parameters. More... | |
virtual string | AppAsymKeyInfo (string appName, string[] args) |
Executes command-line action - prints information about asymmetric keys specified by command-line parameters. More... | |
virtual string | AppAsymExportKey (string appName, string[] args) |
Executes command-line action - exports asymmetric keys specified by command-line parameters. More... | |
virtual string | AppCertStoreInfo (string appName, string[] args) |
Executes command-line action - prints information about the certificate stores specified by command-line parameters. More... | |
virtual string | AppAddCertificate (string appName, string[] args) |
Executes command-line action - prints information about the certificate stores specified by command-line parameters. More... | |
virtual string | AppRemoveCertificate (string appName, string[] args) |
Executes command-line action - removes certificate with the specified name from the specified certificate store. More... | |
virtual string | AppCertInfo (string appName, string[] args) |
Executes command-line action - prints information about the certificate specified by command-line parameters. More... | |
virtual string | AppAsymTest (string appName, string[] args) |
Executes command-line action - a couple of custom asymmetric encryption-related tests. More... | |
Public Member Functions inherited from IG.Crypto.CryptoParameters | |
CryptoParameters () | |
void | Reset () |
Resets the state. More... | |
bool | IsFlagsSet (params CryptoFlags[] whichFlags) |
Returns true if ALL the specified flags are set, or false if some of them are unset. More... | |
bool | IsAnyFlagSet (params CryptoFlags[] whichFlags) |
Returns true if any of the specified flags is set, or false if none of them is set. More... | |
void | SetFlags (params CryptoFlags[] whichFlags) |
Sets the specified flags. More... | |
void | ClearFlags (CryptoFlags firstFlags, params CryptoFlags[] whichFlags) |
Clears the specified flags. More... | |
void | ClearAllFlags () |
Clears all flags. More... | |
Protected Member Functions | |
virtual void | ReportError (string errorString) |
Used in the current class to report an error. More... | |
virtual void | ReportWarning (string errorString) |
Used in the current class to launch a warning message. More... | |
virtual void | ReportInfo (string errorString) |
Used in the current class to launch an informative message. More... | |
virtual void | WarnAboutPlainEncryption () |
Writes a notification informing that a cryptographic task has been delegated to the CryptoParameters class. More... | |
virtual void | WarnExportPrivateKey () |
Writes a notification informing that a private key may be exported. More... | |
virtual string | AppEncryptSymmetricAll (string appName, string[] args, bool isDecrypt=false, bool isPlain=false, bool isBasic=false) |
Executes command-line action - symmetric encryption of files or text. More... | |
virtual string | AppKeyGenerationAll (string appName, string[] args, bool measureTimes, int numGenerations) |
Executes command-line action - one of the actions related to key generation. More... | |
Protected Attributes | |
bool | _isDecrypt = false |
bool | _isLargestKey = false |
Properties | |
int | OutputLevel [get, set] |
Level of output during operation. More... | |
string | AppName [get, protected set] |
string[] | AppArguments [get, set] |
Last (or currently) read command-line arguments. More... | |
int | NumAppArguments [get] |
Number of command-line arguments. More... | |
PasswordAlgorithmType | PasswordAlgorithmType [get, set] |
Type of the algorithm used for password hashing. More... | |
string | PasswordAlgorithmTypeString [get, set] |
Name of the algorithm used in password hashing. More... | |
PasswordAlgorithmBase | PasswordAlgorithm [get, set] |
Password hashing algorithm. More... | |
string | AlgorithmTypeString [get, set] |
String representation of algorithm type. More... | |
HashType | HashAlgorithmType [get, set] |
Hashing algorithm type. More... | |
SymmetricAlgorithmType | SymmetricAlgorithmType [get, set] |
Symmetric algorithm type. More... | |
bool | IsDecrypt [get, protected set] |
Whether decryption is perrformed, rather than encryption. More... | |
bool | IsEncrypt [get, protected set] |
Whether decryption is perrformed, rather than encryption. More... | |
bool | IsExportPrivateKey [get, protected set] |
Whether private key is also exported or printed. More... | |
AsymmetricAlgorithmType | AsymAlgorithmType [get, protected set] |
AsymmetricAlgorithm | AsymAlgorithm [get, set] |
Asymmetric algorithm, equipped with keys, that will perform asymmetric cryptographic tasks. More... | |
CspProviderFlags | AsymFlags [get, set] |
Asymmetric CSP (crypto service provider) flags. More... | |
string | AsymAlgorithmTypeString [get, protected set] |
String that represents asymmetric algorithm type. More... | |
string | AsymKeyContainerName [get, protected set] |
Asymmetric key container name. More... | |
string | AsymKeyFileXml [get, protected set] |
Asymmetric key file path in XML format. More... | |
string | CertificatePath [get, protected set] |
Path to the certificate file (e.g. for obtaining asymmetric keys). More... | |
string | CertificateName [get, protected set] |
Certificate name (usually specified to locate the certificate in a certificate store). More... | |
string | CertificateStoreName [get, protected set] |
Name of the certificate store (usually, to locate the specified certificate). More... | |
int | CertificateStoreLocation [get, protected set] |
Location of the certificate store (usually used to filter certificate stores). More... | |
bool | IsCertificatePasswordThroughUi [get, protected set] |
Indicates that pasword for private key should obtained from the user through GUI (usually through console). More... | |
string | CertificatePassword [get, set] |
Password for accessing private keys (e.g. for private keys associated with certificate). More... | |
string | HashValue [get, set] |
Hash value, usually used for checking consistency. More... | |
bool | IsStringInput [get, set] |
Flag indicating that input are strings or encoded byte arrays, rather than files. More... | |
int | PasswordLength [get, set] |
Length of the (generated) password. More... | |
string | PasswordString [get, set] |
byte[] | PasswordBytes [get, set] |
Password as byte array. More... | |
int | SaltLength [get, set] |
Length of salt. More... | |
string | SaltString [get, set] |
Salt string. More... | |
byte[] | SaltBytes [get, set] |
Salt as byte array. More... | |
int | IvLength [get, set] |
Length of the initialization vector. More... | |
string | IvString [get, set] |
Initialization vector in string form. More... | |
byte[] | IvBytes [get, set] |
Initialization vector as byte array. More... | |
int | KeyLength [get, set] |
Length of the key. More... | |
byte[] | KeyBytes [get, set] |
Secret key as byte array. More... | |
bool | IsLargestKey [get, set] |
Whether the largest available key size for the algorithm in use is taken. More... | |
int | NumPasswordIterations [get, set] |
Number of iterations in passworg hashing algorithms, aimed at increasing processing effort to break the password. More... | |
List< string > | FreeParameters [get] |
List of free parameters from the parsed command-line. More... | |
int | NumFreeParameters [get] |
Number of free parameters (obtained from commans-line arguments). More... | |
string | ReturnedString [get, set] |
Returned value of command-line application methods. More... | |
bool | IsChecked [get, set] |
Indicates that something is verified, not calculated (or checked in addition, after calculation). More... | |
double | TargetedTotalTime [get, set] |
Total time targeted in multi-pass algorithms (e.g. in password hashing). More... | |
bool | IsInputFormatString [get, set] |
Whether input format is ordinary string. Returns true if there is no binary format specified, false if there is. More... | |
bool | IsInputFormatLongInt [get, protected set] |
bool | IsInputFormat64 [get, protected set] |
Whether input is in form of base-64 encoded byte array. More... | |
bool | IsInputFormatHex [get, protected set] |
Whether input is in form of hexadecimal encoded byte array. More... | |
bool | IsOutputFormatString [get, set] |
Whether output format is ordinary string. Returns true if there is no binary format specified, false if there is. More... | |
bool | IsOutputFormatLongInt [get, protected set] |
Whether output is in form of long integer. More... | |
bool | IsOutputFormat64 [get, protected set] |
Whether output is in form of base-64 encoded byte array. More... | |
bool | IsOutputFormatHex [get, protected set] |
Whether output is in form of hexadecimal encoded byte array. More... | |
Properties inherited from IG.Crypto.CryptoParameters | |
CryptoFlags | Flags [get, private set] |
Flags for cryptographic operations performed. More... | |
Private Attributes | |
int | _outputLevel = 2 |
string | _appName = null |
string[] | _appArguments = null |
PasswordAlgorithmType | _passwordAlgorithmType = PasswordAlgorithmType.Default |
string | _passwordAlgorithmTypeString = null |
PasswordAlgorithmBase | _passwordAlgorithm = null |
string | _algorithmTypeString = null |
HashType | _hashAlgorithmType = HashType.Default |
SymmetricAlgorithmType | _symmetricAlgorithmType = SymmetricAlgorithmType.Default |
bool | _isExportPrivateKey = false |
AsymmetricAlgorithmType | _asymAlgorithmType = AsymmetricAlgorithmType.Default |
AsymmetricAlgorithm | _asymAlgorithm = null |
CspProviderFlags | _asymFlags = CspProviderFlags.NoFlags |
string | _asymAlgorithmTypeString = null |
string | _asymKeyContainerName = null |
string | _asymKeyFileXml = null |
string | _certificatePath = null |
string | _certificateName = null |
string | _certificateStoreName = null |
int | _certificateStoreLocation = 0 |
bool | _certificatePasswordThroughUi = false |
string | _certificatePassword = null |
string | _hashValue = null |
bool | _isStringInput = false |
int | _passwordLength = 0 |
string | _passwordString = null |
byte[] | _passwordBytes = null |
int | _saltLength = 0 |
string | _saltString = null |
byte[] | _saltBytes = null |
int | _ivLength = 0 |
string | _ivString = null |
byte[] | _ivBytes = null |
int | _keyLength = 0 |
byte[] | _keyBytes = null |
int | _numPasswordIterations = 0 |
List< string > | _freeParameters = new List<string>() |
string | _returnedString = null |
bool | _isChecked = false |
double | _targetedTotalTime = 0.1 |
string | OutputPath = null |
List< string > | RecursivePathList = new List<string>() |
List< string > | RecursivePathListByLevels = new List<string>() |
List< string > | RecursiveFilePatterns = new List<string>() |
int | RecursiveDirectoryLevels = -1 |
bool | IsRelativePaths = false |
bool | IsAbsolutePaths = false |
bool | IsDeleteOriginal = false |
Specifies whether the original files should be deleted. More... | |
bool | IsDeleteEncrypted = false |
Specifies whether the encrypted files should be deleted. More... | |
bool | IsDeleteDecrypted = false |
Specifies whether the encrypted files should be deleted. More... | |
bool | IsDeleteAllVersions = false |
Specifies whether all versions of a file (e.g. original, encrypted, and decrypted) are allowed to be deleted (e.g. in a file clean-up operation). More... | |
bool | IsForceOverwrites = false |
If true then eventual file overwtires are automatically performed by the relevant operation without asking for user's approval. More... | |
bool | IsSkipOverwrites = false |
If true then eventual file overwrites are automatically wasSkipped by the relevant operation. More... | |
bool | IsForceDeletes = false |
bool | IsSkipDeletes = false |
bool | IsInputFormatEqualOutputFormat = false |
If true then options for input formats and output format are treated interchangeably in the currentt context (e.g. in the current command-line application). More... | |
bool | _isInputFormatLongInt = false |
bool | _isInputFormat64 = false |
bool | _isInputFormatHex = false |
bool | _isOutputFormatLongInt = false |
bool | _isOutputFormat64 = false |
bool | _isOutputFormatHex = false |
Static Private Attributes | |
static int | _numNotifyPlainEncryption = 0 |
static int | _numNotifyExportPrivateKey = 0 |
Performs high level cryptographic opereratins, such ass reading command-line parameters and performing high-level tasks that can be directly used in application commands (i.e. those commands that are installed on applicaition interpreters).
|
inline |
|
inline |
|
inlineprotectedvirtual |
Used in the current class to report an error.
errorString | Error message that is a part of the output generated by this function. |
|
inlineprotectedvirtual |
Used in the current class to launch a warning message.
errorString | Warning message that is a part of the output generated by this function. |
|
inlineprotectedvirtual |
Used in the current class to launch an informative message.
errorString | Warning message that is a part of the output generated by this function. |
|
inlineprotectedvirtual |
Writes a notification informing that a cryptographic task has been delegated to the CryptoParameters class.
|
inlineprotectedvirtual |
Writes a notification informing that a private key may be exported.
|
inline |
Returns the specified free parameter (obtained from commans-line arguments).
whichParameter | Index of the free parameter to be returned. |
|
inlinevirtual |
Reads parameters for cryptographic operations to be performed from the specified command line.
Parameters read from this function can be used by any high level function that actually performs cryptographic operations.
appName | Name of the embedded application for which parameters are read. |
args | Arguments of the embedded application's command. |
References IG.Lib.Util.FromHexString(), IG.Crypto.UtilCrypto.GetAsymmetricAlgorithmType(), IG.Crypto.UtilCrypto.GetCspProviderFlags(), IG.Crypto.UtilCrypto.GetHashType(), IG.Crypto.UtilCrypto.GetPasswordAlgorithmType(), and IG.Crypto.UtilCrypto.GetSymmetricAlgorithmType().
|
inlinevirtual |
Gets a list of input files specified by command-line arguments that had been previously parsed by the ParseCommandlineParameters method.
inputFilePaths | List where the obtained input file paths are stored. |
enableWildcards | If true (which is default) then file paths listed as free parameters will be resolved by expanding wildcard characters. |
addRecursive | If true (which is default) then files obtained by recursive directory listings are also included. |
clearBefore | If true (which is default) then the list inputFilePaths is cleared before operation. If false then extracted file paths are added to the eventual existing items already on the list. This is an untypical situation and there will rarely bee any need for this. |
References IG.Lib.UtilSystem.GetAbsolutePath(), IG.Lib.UtilSystem.GetRelativePath(), IG.Lib.UtilSystem.ListFilesByLevels(), and IG.Lib.UtilSystem.ListFilesRecursively().
|
inlinevirtual |
Executes command-line action - symmetric encryption of files or text by using BASIC class of methods.
appName | Name of the embedded application. |
args | Arguments of the embedded application's command. |
Referenced by IG.Script.ScriptAppBase.CryptoFunctionEncryptBasic().
|
inlinevirtual |
Executes command-line action - symmetric decryption of files or text by using BASIC class of methods.
appName | Name of the embedded application. |
args | Arguments of the embedded application's command. |
Referenced by IG.Script.ScriptAppBase.CryptoFunctionDecryptBasic().
|
inlinevirtual |
Executes command-line action - symmetric encryption of files or text by using PLAIN class of methods.
appName | Name of the embedded application. |
args | Arguments of the embedded application's command. |
Referenced by IG.Script.ScriptAppBase.CryptoFunctionEncryptPlain().
|
inlinevirtual |
Executes command-line action - symmetric decryption of files or text by using PLAIN class of methods.
appName | Name of the embedded application. |
args | Arguments of the embedded application's command. |
Referenced by IG.Script.ScriptAppBase.CryptoFunctionDecryptPlain().
|
inlineprotectedvirtual |
Executes command-line action - symmetric encryption of files or text.
appName | Name of the embedded application. |
args | Arguments of the embedded application's command. |
isDecrypt | If true then decryption is performed, otherwise encryption is performed. |
isPlain | If true then PLAIN class of encryption/decrypton methods is used. |
isBasic | If true then BASIC class of encryption/decryption metthods is used. |
References IG.Lib.StopWatch1.CpuTime, IG.Crypto.UtilCrypto.DecryptFilePlain(), IG.Crypto.UtilCrypto.DecryptPlain(), IG.Crypto.UtilCrypto.DecryptStringPlain(), IG.Crypto.UtilCrypto.EncryptFilePlain(), IG.Crypto.UtilCrypto.EncryptPlain(), IG.Crypto.UtilCrypto.EncryptStringPlain(), IG.Lib.Util.FromHexString(), IG.Lib.UtilConsole.Read(), IG.Lib.UtilConsole.ReadPwd(), IG.Lib.StopWatch1.Start(), IG.Lib.StopWatch1.Stop(), IG.Crypto.UtilCrypto.StringEncoding, IG.Crypto.UtilCrypto.SymmetricAlgorithmTypeToString(), IG.Lib.StopWatch1.Time, IG.Lib.Util.ToHexString(), IG.Lib.StopWatch1.TotalCpuTime, and IG.Lib.StopWatch1.TotalTime.
|
inlinevirtual |
Executes command-line action - calculation of various hashRet values of a file.
appName | Name of the embedded application. |
args | Arguments of the embedded application's command. |
References IG.Crypto.UtilCrypto.GetFileHashMd5Hex(), IG.Crypto.UtilCrypto.GetFileHashSha1Hex(), IG.Crypto.UtilCrypto.GetFileHashSha256Hex(), IG.Crypto.UtilCrypto.GetFileHashSha512Hex(), IG.Lib.UtilConsole.Read(), and IG.Lib.UtilStr.ToBoolean().
Referenced by IG.Script.ScriptAppBase.CryptoFunctionGetFileHash().
|
inlinevirtual |
Executes command-line action - calculation of various hashRet values of files or text.
appName | Name of the embedded application. |
args | Arguments of the embedded application's command. |
References IG.Crypto.UtilCrypto.CheckFileHashHex(), IG.Crypto.UtilCrypto.CheckHashHex(), IG.Crypto.UtilCrypto.CheckStringHashHex(), IG.Lib.Util.FromHexString(), IG.Crypto.UtilCrypto.GetFileHashHex(), IG.Crypto.UtilCrypto.GetHashHex(), IG.Crypto.UtilCrypto.GetStringHashHex(), IG.Crypto.UtilCrypto.ParseHashFile(), IG.Lib.UtilConsole.Read(), and IG.Lib.Util.ToByteArray().
Referenced by IG.Script.ScriptAppBase.CryptoFunctionCheckSum().
|
inlinevirtual |
Executes command-line action - conversion between different representations of data.
appName | Name of the embedded application. |
args | Arguments of the embedded application's command. |
References IG.Lib.Util.FromHexString(), IG.Lib.Util.ToByteArray(), and IG.Lib.Util.ToHexString().
Referenced by IG.Script.ScriptAppBase.CryptoFunctionConvert().
|
inlinevirtual |
Executes command-line action - deletion of eventual redundant files that remained in the file system after cryptographic operations..
appName | Name of the embedded application. |
args | Arguments of the embedded application's command. |
References IG.Lib.UtilConsole.Read().
Referenced by IG.Script.ScriptAppBase.CryptoFunctionCleanFiles().
|
inlinevirtual |
Executes command-line action - measuring time of password generaton algorithms.
Key generation algorithm type and other parameters such as password and salt are determined by command-line options.
appName | Name of the embedded application. |
args | Arguments of the embedded application's command. |
Referenced by IG.Script.ScriptAppBase.CryptoFunctionTimeKeyGeneration().
|
inlinevirtual |
Executes command-line action - generates a random initialization vector for symmetric encryption.
Key generation algorithm type and other parameters such as password and salt are determined by command-line options.
appName | Name of the embedded application. |
args | Arguments of the embedded application's command. |
Referenced by IG.Script.ScriptAppBase.CryptoFunctionGetKey().
|
inlinevirtual |
Executes command-line action - generates a random initialization vector for symmetric encryption.
Key generation algorithm type and other parameters such as password and salt are determined by command-line options.
appName | Name of the embedded application. |
args | Arguments of the embedded application's command. |
Referenced by IG.Script.ScriptAppBase.CryptoFunctionGetInitializationVector().
|
inlinevirtual |
Executes command-line action - generates a random salt bytes.
Key generation algorithm type and other parameters such as password and salt are determined by command-line options.
appName | Name of the embedded application. |
args | Arguments of the embedded application's command. |
Referenced by IG.Script.ScriptAppBase.CryptoFunctionGetSalt().
|
inlinevirtual |
Resolves password related parameters such as password, salt, and generated key length.
Paremeters that determine which free paremeters map to password-related parameters such as key length and number of iterations of key generation algorithm, must fill free parameters up to the specified index.
whichFreeParameterkeyLength | Index of free parameter that can eventually represent the key length. If less than 0 then key length can not be specified by free parameters. |
whichFreeParameterNumIterations | Index of free parameter that can eventually represent the number of iterations in password generating algorithm. If less than 0 then number of key generation iterations can not be specified by free parameters. |
References IG.Crypto.UtilCrypto.GetRandomBytes(), and IG.Crypto.UtilCrypto.StringEncoding.
|
inlineprotectedvirtual |
Executes command-line action - one of the actions related to key generation.
appName | Name of the embedded application. |
args | Arguments of the embedded application's command. |
measureTimes | If true then time necessary for key generation with given parameters is measured. Otherwise, the key is actually created. The key can also be used as initialization vector. |
numGenerations | Number of repetirions of key algorithm before return. This makes possible to to generate different outputs e.g. for key, for initialization vector, or for salt. |
References IG.Crypto.UtilCrypto.GetPasswordAlgorithm(), IG.Crypto.UtilCrypto.GetPasswordAlgorithmType(), IG.Crypto.PasswordAlgorithmBase.Init(), IG.Lib.StopWatch1.TestExecutionTime(), and IG.Lib.Util.ToHexString().
|
inlinevirtual |
Resolves asymmetric algorithm parameters from the information that has been previously obtained through command-line parameters.
References IG.Crypto.UtilCrypto.GetAsymmetricAlgorithm(), and IG.Crypto.UtilCrypto.GetAsymmetricAlgorithmType().
|
inlinevirtual |
Executes command-line action - prints information about asymmetric keys specified by command-line parameters.
Information necessary to access the asymmetric keys is extracted from command-line parameters.
appName | Name of the embedded application. |
args | Arguments of the embedded application's command. |
References IG.Crypto.UtilCrypto.AsymEncryptionDecryptionTest(), IG.Crypto.DSA, IG.Crypto.UtilCrypto.GetAsymmetricalgorithmHash(), IG.Crypto.UtilCrypto.GetMaximalAsymmetricTextLength(), IG.Crypto.UtilCrypto.ToString(), and IG.Lib.Util.XmlToString().
Referenced by IG.Script.ScriptAppBase.CryptoFunctionAsymKeyInfo().
|
inlinevirtual |
Executes command-line action - exports asymmetric keys specified by command-line parameters.
Information necessary to access the asymmetric keys is extracted from command-line parameters.
appName | Name of the embedded application. |
args | Arguments of the embedded application's command. |
References IG.Crypto.UtilCrypto.AsymEncryptionDecryptionTest(), IG.Crypto.UtilCrypto.GetAsymmetricalgorithmHash(), IG.Crypto.UtilCrypto.GetMaximalAsymmetricTextLength(), IG.Lib.UtilConsole.Read(), IG.Crypto.UtilCrypto.ToString(), and IG.Lib.Util.XmlToString().
|
inlinevirtual |
Executes command-line action - prints information about the certificate stores specified by command-line parameters.
Information necessary to access the stores is extracted from command-line parameters.
appName | Name of the embedded application. |
args | Arguments of the embedded application's command. |
References IG.Crypto.UtilCrypto.GetCertificateStoreDescription().
Referenced by IG.Script.ScriptAppBase.CryptoFunctionCertStoreInfo().
|
inlinevirtual |
Executes command-line action - prints information about the certificate stores specified by command-line parameters.
Information necessary to access the stores is extracted from command-line parameters.
appName | Name of the embedded application. |
args | Arguments of the embedded application's command. |
References IG.Crypto.UtilCrypto.AddCertificateToStore(), IG.Crypto.UtilCrypto.GetCertificate(), IG.Crypto.UtilCrypto.GetSimpleName(), and IG.Lib.UtilConsole.ReadPwd().
Referenced by IG.Script.ScriptAppBase.CryptoFunctionAddCertificate().
|
inlinevirtual |
Executes command-line action - removes certificate with the specified name from the specified certificate store.
Information about the certificate name and the store is extracted from command-line parameters.
appName | Name of the embedded application. |
args | Arguments of the embedded application's command. |
References IG.Crypto.UtilCrypto.DeleteCertificateFromStore().
Referenced by IG.Script.ScriptAppBase.CryptoFunctionRemoveCertificate().
|
inlinevirtual |
Executes command-line action - prints information about the certificate specified by command-line parameters.
Information necessary to access the certificate is extracted from command-line parameters.
appName | Name of the embedded application. |
args | Arguments of the embedded application's command. |
References IG.Crypto.UtilCrypto.AsymEncryptionDecryptionTest(), IG.Crypto.DSA, IG.Crypto.UtilCrypto.GetAsymmetricalgorithmHash(), IG.Crypto.UtilCrypto.GetCertificate(), IG.Crypto.UtilCrypto.GetMaximalAsymmetricTextLength(), IG.Lib.UtilConsole.ReadPwd(), and IG.Crypto.UtilCrypto.ToString().
Referenced by IG.Script.ScriptAppBase.CryptoFunctionCertInfo().
|
inlinevirtual |
Executes command-line action - a couple of custom asymmetric encryption-related tests.
appName | Name of the embedded application. |
args | Arguments of the embedded application's command. |
References IG.Crypto.UtilCrypto.AsymEncryptionDecryptionTest(), IG.Crypto.UtilCrypto.DecryptAsymShort(), IG.Crypto.UtilCrypto.DecryptStringAsymShort(), IG.Crypto.UtilCrypto.DeleteKeyInCsp(), IG.Crypto.UtilCrypto.EncryptAsymShort(), IG.Crypto.UtilCrypto.EncryptStringAsymShort(), IG.Crypto.UtilCrypto.GetAsymmetricAlgorithm(), IG.Lib.StopWatch1.Start(), IG.Lib.StopWatch1.Stop(), IG.Crypto.UtilCrypto.StringEncoding, IG.Lib.StopWatch1.Time, IG.Crypto.UtilCrypto.ToString(), and IG.Lib.Util.XmlToString().
Referenced by IG.Script.ScriptAppBase.CryptoFunctionAsymTest().
|
staticprivate |
|
staticprivate |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
protected |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
protected |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
Specifies whether the original files should be deleted.
This can refer to deletion of the original file(s) after encryption or decryption, or to deletion of the original file in a group(s) of associated files (original, encrypted, decrypted).
|
private |
Specifies whether the encrypted files should be deleted.
This can refer to deletion of the encrypted file(s) in a group(s) of associated files (original, encrypted, decrypted) during a separate clean-up operation.
|
private |
Specifies whether the encrypted files should be deleted.
This can refer to deletion of the decrypted file(s) in a group(s) of associated files (original, encrypted, decrypted) during a separate clean-up operation.
|
private |
Specifies whether all versions of a file (e.g. original, encrypted, and decrypted) are allowed to be deleted (e.g. in a file clean-up operation).
|
private |
If true then eventual file overwtires are automatically performed by the relevant operation without asking for user's approval.
|
private |
If true then eventual file overwrites are automatically wasSkipped by the relevant operation.
This means that whenever the operation in question would normally have to overwrite an existent file, this is wasSkipped, without even asking ro user's approval. For example, if decryption is performed but some of the original files already exist then these files will not be dcrypted as the operation would heve to overrwrite the original files.
|
private |
|
private |
|
private |
If true then options for input formats and output format are treated interchangeably in the currentt context (e.g. in the current command-line application).
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
getsetprivate |
Level of output during operation.
|
getprotected set |
|
getset |
Last (or currently) read command-line arguments.
|
getprivate |
Number of command-line arguments.
|
getsetprivate |
Type of the algorithm used for password hashing.
|
getsetprivate |
Name of the algorithm used in password hashing.
|
getsetprivate |
Password hashing algorithm.
|
getsetprivate |
String representation of algorithm type.
|
getsetprivate |
Hashing algorithm type.
|
getsetprivate |
Symmetric algorithm type.
|
getprotected set |
Whether decryption is perrformed, rather than encryption.
|
getprotected set |
Whether decryption is perrformed, rather than encryption.
|
getprotected set |
Whether private key is also exported or printed.
|
getprotected set |
|
getsetprotected |
Asymmetric algorithm, equipped with keys, that will perform asymmetric cryptographic tasks.
|
getset |
Asymmetric CSP (crypto service provider) flags.
|
getprotected set |
String that represents asymmetric algorithm type.
|
getprotected set |
Asymmetric key container name.
|
getprotected set |
Asymmetric key file path in XML format.
|
getprotected set |
Path to the certificate file (e.g. for obtaining asymmetric keys).
|
getprotected set |
Certificate name (usually specified to locate the certificate in a certificate store).
|
getprotected set |
Name of the certificate store (usually, to locate the specified certificate).
|
getprotected set |
Location of the certificate store (usually used to filter certificate stores).
|
getprotected set |
Indicates that pasword for private key should obtained from the user through GUI (usually through console).
|
getsetprotected |
Password for accessing private keys (e.g. for private keys associated with certificate).
|
getsetprivate |
Hash value, usually used for checking consistency.
|
getsetprivate |
Flag indicating that input are strings or encoded byte arrays, rather than files.
|
getsetprivate |
Length of the (generated) password.
|
getsetprivate |
|
getsetprivate |
Password as byte array.
|
getsetprivate |
Length of salt.
|
getsetprivate |
Salt string.
|
getsetprivate |
Salt as byte array.
|
getsetprivate |
Length of the initialization vector.
|
getsetprivate |
Initialization vector in string form.
|
getsetprivate |
Initialization vector as byte array.
|
getsetprivate |
Length of the key.
|
getsetprivate |
Secret key as byte array.
|
getsetprivate |
Whether the largest available key size for the algorithm in use is taken.
|
getsetprivate |
Number of iterations in passworg hashing algorithms, aimed at increasing processing effort to break the password.
|
getprotected |
List of free parameters from the parsed command-line.
|
get |
Number of free parameters (obtained from commans-line arguments).
|
getsetprivate |
Returned value of command-line application methods.
|
getsetprivate |
Indicates that something is verified, not calculated (or checked in addition, after calculation).
|
getsetprotected |
Total time targeted in multi-pass algorithms (e.g. in password hashing).
|
getsetprivate |
Whether input format is ordinary string. Returns true if there is no binary format specified, false if there is.
|
getprotected set |
|
getprotected set |
Whether input is in form of base-64 encoded byte array.
|
getprotected set |
Whether input is in form of hexadecimal encoded byte array.
|
getsetprivate |
Whether output format is ordinary string. Returns true if there is no binary format specified, false if there is.
|
getprotected set |
Whether output is in form of long integer.
|
getprotected set |
Whether output is in form of base-64 encoded byte array.
|
getprotected set |
Whether output is in form of hexadecimal encoded byte array.