RC2 Block Cipher
ActiveX Library 1.02 |
This library will encrypt information
using the RC2 block cipher by RSA. It also has a built-in
system to export the encrypted information to a more appropiate format to travel through
network or modem connections, including e-mail.
The implementation of this algorithm has
been done based on the RFC 2268, "A Description of the
RC2(r) Encryption Algorithm" by R. Rivest from RSA. You can use the test vectors
specified in this document to test the integrity of the algorithm.
IMPORTANT NOTICE: The
RC2 algorithm is owned by RSA. If you want to use in a commercial program, you will have
to get a license to use it. Go to http://www.rsa.com for
more information.
IMPORTANT NOTICE ABOUT RESTRICTIONS ON IMPORTING
STRONG ENCRYPTION ALGORITHMS IN SOME COUNTRIES: This encryption algorythm is a
block cipher that uses a length-variable key, limited to a maximum of 1024 bits. Due to
this, some people might not be allowed by the goverments of their countries to download
this library and make use of it. Check your local restrictions. Spanish citizens
don't have restrictions of any kind over encryption algorythms, so please enjoy
and make use of this library. Anyways, no information is saved about where this library
goes to when people download it, neither on who comes to this web. This doesn't mean, at
all, that I'm inviting you not to follow the law in your country, if it is the case.
Properties:
- EffectiveKeyLength. This unit is in bits. The default is
0, what means that the library will calculate the effective key length based on the length
of the password. Anyways, you can set this value to any number between 1 and 1024 if you
want to force the algorithm to use any other effective key length.
- Key. String that will be used as the key to encrypt and
decrypt.
- KeyHex. The same as Key but given in hexadecimal format.
- Result. The result of the last encryption or decryption.
- ResultAsc. The same as Result but given in ascii format.
This is shorter than hexadecimal and proper to send information by e-mail or network
connections.
- ResultHex. The same as Result but given in hexadecimal
format.
Methods:
- Decrypt (sText As String) As String. This will decrypt the
information given in sText.
- DecryptAsc (sAsc As String) As String. The same as Decrypt
but will assume that the information given is in ascii format (result of the ResultAsc
property).
- DecryptHex (sHex As String) As String. The same as Decrypt
but will assume that the information given is in hexadecimal format (result of the
ResultHex property).
- Encrypt (sText As String) As String. This will encrypt the
string given in sText.
- EncryptAsc (sText As String) As String. This will function
will encrypt information assuming that the information to encrypt is given in normal
format. The output will be converted to ascii (same as ResultAsc).
- EncryptHex (sHex As String) As String. The same has
Encrypt but will assume that the information given is in hexadecimal format.
History:
- 27.04.98, version 1.0 released.
- Version 1.01: internal release.
- Version 1.02 30.04.98: Many internal changes made to
improve performance. Added the 'EncryptAsc' function.
|
(19 Kb) |
© Alvaro Redondo, 1998. All Rights Reserved.
http://www.sevillaonline.com/ActiveX/