Activecrypt Online Help Prev Next
About ActiveCrypt
About
ActiveCrypt overview
How to ...
How to make pair of keys
Create new public key from private
How to decrypt string
How to encrypt string
How to save keys
Free keys
Programmer reference
Hash
Hash overview
Methods
HashFile
HashVariant
Properties
Error
Crypt
Encryption overview
Methods
DecryptFile
DecryptVariant
EncryptFile
EncryptVariant
FreeKey
LoadKeyFromString
LoadKey
Properties
AddCRLF
Error
KeySize
Base64
Base64 overview
Methods
DecodeFile
DecodeVariant
EncodeFile
EncodeVariant
Properties
AddCRLF
Error
Sign
Sign overview
Methods
FreeKey
LoadKey
LoadKeyFromString
MakeVariantSignature
MakeFileSignature
VerifyFileSignature
VerifyVariantSignature
Properties
AddCRLF
Error
RSACrypt (old, use Crypt)
Methods
FreeKey
GenerateCouple
GeneratePublicKey
GetVersion
LoadKeyFromString
LoadKey
PublicEncrypt
PrivateDecrypt
SaveKeyToString
SaveKey
Properties
About
Async
Error
Events
OnDecryptionFinished
OnEncryptionFinished
OnError
OnKeyGenerationFinished
Disclaimer

EncryptVariant

Sub EncryptVariant ( InputVariant As Variant, Method As ENCRYPTION_METHODS, Password As Variant ) As String

This function provides common way for encryption of variants with different encryption algorithms. Method defines encryption method. Currently Method can be one of the following:

Symbolic name Numeric value Description
ENC_AES 0 Advanced encryption standard
ENC_RC4 1 RC4 by Ron Rivest
ENC_RC5 2 RC5 by Ron Rivest.
ENC_RSA 3 RSA is an asymmetric algorithm for public key cryptography.
ENC_IDEA 4 International Data Encryption Algorithm
ENC_CAST5 5 CAST5 accordingly to RFC 2144
ENC_BLOWFISH 6 Blowfish encryption
ENC_DES3 7 Tripple DES
ENC_DESX 8 DESX ( a strengthened variant of DES)

If you use ENC_RSA method you should pass handle of the loaded key in the Password parameter. You can load a key with LoadKey function.

If the function fails the return value is False and the Error property contains the error code . Analyzing this property you can find the reason of the failure. If you want to encrypt files you should use EncryptFile function.

This HTML Help has been published using the chm2web software.