Class | Method | Syntax | Returns | Remarks |
aes128 tdea des blf
|
HexMode |
Public Function HexMode(ByVal strInput As String,
ByVal strHexKey As String, ByVal bEncrypt As Boolean,
ByVal strMode As String, ByVal strHexIV As String) As String
|
Ciphertext or plaintext in hex format |
strInput, strHexKey, strHexIV required in hex format.
szInput must be an exact multiple of the block length in bytes (use PadHex ).
Set bEncrypt as True to encrypt and False to decrypt.
Set szMode as "ECB", "CBC", "CFB", "OFB" or "CTR".
Set szHexIV as an empty string for ECB mode.
|
aes128 tdea des blf
|
PadHex |
Public Function PadHex(ByVal strData As String) As String
|
Hex data padded according to CMS/PKCS#5/#7. |
szData required in hex format.
|
aes128 tdea des blf
|
UnpadHex |
Public Function UnpadHex(ByVal strData As String) As String
|
Hex data with padding stripped according to CMS/PKCS#5/#7 or untouched data if padding is invalid. |
szData required in hex format.
|
pc1 |
EncryptHex |
Public Function EncryptHex(ByVal sInputHex As String, ByVal strHexKey As String) As String
|
Encrypted data in hex format. |
Input data szInputHex and szHexKey required in hex format.
Both input and key may be of any length greater than zero.
|
hash |
HexFromFile |
Public Function HexFromFile(ByVal strFileName As String, hashAlgorithm As Long) As String
|
Message digest hash in hex format of binary file. |
Choose hashAlgorithm from properties {
HASH_MD2 |
HASH_MD5 |
HASH_RMD160 |
HASH_SHA1 |
HASH_SHA224 |
HASH_SHA256 |
HASH_SHA384 |
HASH_SHA512 |
HASH_SHA3_224 |
HASH_SHA3_256 |
HASH_SHA3_384 |
HASH_SHA3_512
}
|
hash |
HexFromHex |
Public Function HexFromHex(ByVal strHexData As String, hashAlgorithm As Long) As String
|
Message digest hash in hex format of hex-encoded input data. |
|
hash |
HexFromString |
Public Function HexFromString(ByVal strData As String, hashAlgorithm As Long) As String
|
Message digest hash in hex format of input tex. |
szData is ordinary ANSI text, not hexadecimal.
|
mac |
HexFromHex |
Public Function HexFromHex(ByVal strHexData As String, ByVal strHexKey As String, macAlgorithm As Long) As String
|
Keyed message authentication code in hex format of hex-encoded data using hex-encoded key. |
Choose macAlgorithm from properties {
CMAC_AES128 |
CMAC_AES192 |
CMAC_AES256 |
CMAC_TDEA |
HMAC_MD5 |
HMAC_RMD160 |
HMAC_SHA1 |
HMAC_SHA224 |
HMAC_SHA256 |
HMAC_SHA384 |
HMAC_SHA512 |
HMAC_SHA3_224 |
HMAC_SHA3_256 |
HMAC_SHA3_384 |
HMAC_SHA3_512
}
|
md5 sha1 sha256
|
StringHexHash |
Public Function StringHexHash(ByVal strData As String) As String
|
Hash digest in hex format of input text. |
szData is ordinary ANSI text, not hexadecimal.
|
md5 sha1 sha256
|
HexHexHash |
Public Function HexHexHash(ByVal strHexData As String) As String
|
Hash digest in hex format of input data also in hex format. |
szHexData is in hex format.
|
md5 sha1 sha256
|
FileHexHash |
Public Function FileHexHash(ByVal strFileName As String) As String
|
Hash digest in hex format of binary data in named file. |
CR-LF combinations are treated as two individual bytes.
|
md5 sha1 sha256
|
FileTextHexHash |
Public Function FileTextHexHash(ByVal strFileName As String) As String
|
Hash digest in hex format of "text" data in named file. |
CR-LF combinations are treated as single newline character.
|
md5 sha1 sha256
|
HmacHex |
Public Function HmacHex(ByVal strHexText As String, ByVal strHexKey As String) As String
|
Keyed hash digest of input text using HMAC algorithm. |
Both szHexText and szHexKey required in hex format.
|
pbe |
DKF2FromString |
Public Function DKF2FromString(ByVal nBytes As Long, ByVal strPassword As String, ByVal strSaltHex As String, nCount As Long) As String
|
Derived key in hex format using the PBKDF2 algorithm from PKCS #5 with default algorithm hmacWithSHA1 . |
szPassword is a plain text string, not hexadecimal, but szSaltHex is required in hex format.
|
rng |
KeyHex |
Public Function KeyHex(ByVal nBytes As Long) As String
|
Returns random number in hex format suitable for a cryptographic key. |
|
rng |
KeyHexWithSeed |
Public Function KeyHexWithSeed(ByVal nBytes As Long, ByVal strSeed As String) As String
|
Returns random number in hex format suitable for a cryptographic key. |
Pass user-defined entropy (seed data) in the string szSeed.
|
rng |
NonceHex |
Public Function NonceHex(ByVal nBytes As Long) As String
|
Returns a random nonce (number used once) in hex format. |
|
rng |
Number |
Public Function Number(ByVal nLower As Long, ByVal nUpper As Long) As Long
|
Returns a random integer in the range [nLower, nUpper]. |
|
crc32 |
FileHex |
Public Function FileHex(ByVal strFileName As String) As String
|
CRC-32 checksum in hex format of binary data in a named file. |
|
crc32 |
StringHex |
Public Function StringHex(ByVal strData As String) As String
|
CRC-32 checksum in hex format of an ANSI string. |
|
conv |
StringFromBytes |
Public Function StringFromBytes(ByVal abData As Variant) As String
|
Converts an array of Bytes into an ANSI string. |
|
conv |
BytesFromString |
Public Function BytesFromString(ByVal str As String) As Variant
|
Converts an ANSI string into an array of Bytes. |
Returns array as a Variant type.
|
conv |
StringFromHex |
Public Function StringFromHex(ByVal strHex As String) As String
|
Converts a hex-encoded string into an ANSI string. |
|
conv |
HexFromString |
Public Function HexFromString(ByVal strData As String) As String
|
Converts an ANSI string into hex format. |
|
conv |
BytesFromHex |
Public Function BytesFromHex(ByVal strHex As String) As Variant
|
Converts a hex-encoded string into an array of Bytes. |
Returns array as a Variant type.
|
conv |
HexFromBytes |
Public Function HexFromBytes(ByVal abData As Variant) As String
|
Converts an array of Bytes into a hex-encoded string. |
|
conv |
Base64FromString |
Public Function Base64FromString(ByVal strData As String) As String
|
Converts an ANSI string into base64 format. |
|
conv |
StringFromBase64 |
Public Function StringFromBase64(ByVal strBase64 As String) As String
|
Converts a base64-encoded string into an ANSI string. |
Only use if you know the all the decoded data are ANSI characters.
|
conv |
BytesFromBase64 |
Public Function BytesFromBase64(ByVal strBase64 As String) As Variant
|
Converts a base64-encoded string into an array of Bytes. |
Returns array as a Variant type.
|
conv |
Base64FromBytes |
Public Function Base64FromBytes(ByVal abData As Variant) As String
|
Converts an array of Bytes into a base64-encoded string. |
|
conv |
HexFromBase64 |
Public Function BytesFromBase64(ByVal strBase64 As String) As String
|
Converts a base64-encoded string directly into a hex-encoded string. |
|
conv |
Base64FromHex |
Public Function Base64FromHex(ByVal strHex As String) As String
|
Converts a hex-encoded string directly into a base64-encoded string. |
|
gen |
Version |
Public Function Version() As Long
|
Returns the underlying CryptoSys core native DLL version number in the form
Major-version*100*100 + Minor-version*100 + Revision-number. |
E.g. version 6.2.1 would return 60201.
|
gen |
ActivexVersion |
Public Function ActivexVersion() As String
|
Returns the version number of the ActiveX module. |
Returns a string, e.g. "3.1.0".
|
gen |
LicenceType |
Public Function LicenceType() As String
|
Returns the CryptoSys API licence type as a String:
"D" for licensed developer edition or "T" for trial edition. |
|
gen |
CompileTime |
Public Function CompileTime() As String
|
Returns the time and date the underlying CryptoSys Win32 DLL file was compiled. |
|
gen |
ModuleName |
Public Function ModuleName() As String
|
Returns the full path name of the underlying CryptoSys Win32 DLL file being used. |
|