Downloads

CTI Encrypt(Application)1.0.zip

CTI Encrypt(SourceCode)1.0.zip

Introduction

An one way text encryption. Able to encrypt with multiple keys, Computer's Processor ID and Hard Disk serial number.
It can be used to encrypt username, password or email (or sentenses) into random code(or blocks of code). All encrypted code is not reversible or be decrypted.

main.png

Version: 1.0

Features:


- Encrypt any text (username, password) or sentenses into random code
- Generated code is not reversible.
- Able to encrypt with multiple key
- Able to encrypt with Processor (CPU) ID and Hard Disk Serial No
- Able to separate the Encrypted Code into several blocks (sections, partitions).
- Able to customize the separator (Used to separate each blocks)
- Able to generate various output format
- Able to enable type-safe character. (exclude "I", "i", "l", "1", "o", "O", "0")
(Note: If user choose "Numbers" only as output format, type-safe will be deactivate)

Using the code

This software is written in C#.

1. Start a new project in Visual Studio.
2. Add a reference of .NET component System.Management.
3. Create a textbox, which design name is textbox1.
3. Download the Source Code of this project.
4. Extract it. Locate a file Encrypt.cs in the Encrypt folder and add it to your current cs project.
5. Add a using command line (shown below) at the top of your cs project file.

using System.Management; 
Now, we can play with the encryption.

Examples

Example 1: Simple single string encryption with default settings

    Encrypt.Encrypt en = new Encrypt.Encrypt();
    string password = "abc123";
    this.textBox1.Text = en.Start(password);

Result:
TBozBDnjj37c4UH9b7wi8d3Y8411nb

Example 2: Simple single string encryption with output length of 45

    Encrypt.Encrypt en = new Encrypt.Encrypt();
    string password = "abc123";
    this.textBox1.Text = en.Start(password, 45);

Result:
hHe0Hc7q6SJAozPM1Jqm57epF5vo3HS505M6FFh801J8P

Example 3: Separate encrypted code into 5 blocks. Each block length is 5.

    Encrypt.Encrypt en = new Encrypt.Encrypt();
    int[] blockSize = new int[] {5,5,5,5,5};
    string password = "abc123";
    this.textBox1.Text = en.Start(password, blockSize);

Result:
0Y9YH-MkiTF-FLgDZ-53ex3-29JSG

Example 4: Encrypt with 3 keys, Processor ID and Hard Disk serial number. Then, separate the blocks with this separator "/". Note: Encrypt with Processor ID will take more time to generate the encrypted code.

            Encrypt.Encrypt en = new Encrypt.Encrypt();

            en.EncryptWithProcessorID = true;
            en.EncryptWithHardDiskSerial = true;
            en.Separator = "/";

            string password = "abc123";

            string key1_bossName = "Michell Anderson";
            string key2_mySecretKey = "12345678";
            string key3_mySecretKey = "raining cats and dogs";

            List<string> multipleKey = new List<string>();

            multipleKey.Add(key1_bossName);
            multipleKey.Add(key2_mySecretKey);
            multipleKey.Add(key3_mySecretKey);

            int[] blockSize = new int[] { 5, 5, 5, 5, 5 };

            this.textBox1.Text = en.StartEnrypt(password, multipleKey, blockSize);

Result:
1h8T7/5idBP/nD8IE/e2lIO/gdg7C

Example 5: Set the output format as Numbers only.

            Encrypt.Encrypt en = new Encrypt.Encrypt();
            en.OutputFormat = Encrypt.Encrypt.OutputCharFormat.NumberOnly;
            string email = "abc123@abc123.com";
            this.textBox1.Text = en.Start(email);

Result:
494253140331165696353975755262

Available output format:

  • All,
  • TextOnly,
  • NumberOnly,
  • SymbolOnly,
  • TextSymbol,
  • NumberSymbol,
  • TextNumber,
  • UpperCaseText,
  • UpperCaseTextNumber,
  • LowerCaseText,
  • LowerCaseTextNumber

Example 6: Display the Processor ID and Hard Disk Serial Number

            Encrypt.Encrypt en = new Encrypt.Encrypt();
            MessageBox.Show(en.FindProcessorId());
            MessageBox.Show(en.FindHardDiskId());

Example 7: Enable type-safe. Exclude the character of "I", "i", "l", "1", "0", "O", "o" from the output.

            Encrypt.Encrypt en = new Encrypt.Encrypt();
            en.OutputFormat = Encrypt.Encrypt.OutputCharFormat.TextNumber;
            en.EnableTypeSafe = true;
            string email = "abc123@abc123.com";
            this.textBox1.Text = en.Start(email);

Result:
23sS3K76Ng2W3aDKQ5TNZe27hqgkH7

Note: type-safe will be deactivate, if the output format is set to NumberOnly.


About Decryption or Reverse of the Encrypted Code

There is currently no decryption of the code. All code generated are not reversible.
Maybe, in future version. Or, maybe you can help out with this.


Example of Application

Example 1: Password Authentication

        Encrypt.Encrypt en = new Encrypt.Encrypt();
        string password_encrypted = "D6d3d1BbnT4M9n81j787j4N8BYcbo3";
        string password_keyin = "123456";

        if(en.Start(password_keyin) == password_encrypted)
        {
            MessageBox.Show("Password Correct. Login Successful");
        }
        else
        {
            MessageBox.Show("Password Incorrect. Login Fail");
        }                


Example 2: Product Activation

        Encrypt.Encrypt en = new Encrypt.Encrypt();
        en.EncryptWithHardDiskSerial = true;
        en.EncryptWithProcessorID = true;
        en.EnableTypeSafe = true;
        en.OutputFormat = Encrypt.Encrypt.OutputCharFormat.UpperCaseTextNumber;
        string UserEmail = "john@abc123.com";

        // User obtain their computer's Hardware ID
        string HardwareID = en.Start(UserEmail, 8);

        // Hardware ID generated, which is "2Z7CJ5U8"

        // User submit their email and hardware id for buying a software product activation key

        string UserEmail = "john@abc123.com";
        string HardwareID = "2Z7CJ5U8";

        // Software Owner generate Product Activation Code
        en.EncryptWithHardDiskSerial = false;
        en.EncryptWithProcessorID = false; 
        int[] ActivationCodeBlockSize = new int[] { 8, 4 };
        string ProductActivationCode = en.Start(UserEmail, HardwareID, ActivationCodeBlockSize);

        // Product Activation Code generated = 535R84MC-7877

        // User received the Product Code and Activate the software in their computer

        // Product Activation
        string userKeyInCode = "535R84MC-7877";
        if (userKeyInCode == en.Start(UserEmail, HardwareID, ActivationCodeBlockSize)
        {
            MessageBox.Show("Activation Code correct. Product activated successfully");
        }
        else
        {
            MessageBox.Show("Invalid Activation Code. Product fail to activate");
        }         

New Feature on the next release V2.0

- Embed one or more algorithm hasing (such as MD5, DES, SHA2, AES) in the encryption process
- User can save settings into profiles.
- The program will remember user last used settings.
- Both one-way(no decryption) and two-way(with decryption) will be available
- License Agreement can be viewed somewhere within the software.
- Able to encrypt and decrypt a text file.
- Acknowledgement can be viewed somewhere within the software (Adopted other encryption source code, application icon)
- Apply Switch or Parameters, run together with the application's EXE file, for silent (unattended) and non-GUI encryption process.

Fix Known minor bug (does not affect the encryption process) :
- The default output format during program startup is different with default output format of the click of button "Reset".

推荐.NET配套的通用数据层ORM框架:CYQ.Data 通用数据层框架