# Large text file encryption per line

Some background:

I receive data in text files of over 16 million records (lines). I need to be able to encrypt the first column in that file so that it cannot be deciphered. This process will be carried out on two data sets with the same first column. The encryption on both these separate files will allow the two sets of data to be joined together on the encrypted column. One of these files is from our company and the other is a different company. When the join process is complete the column can be deleted. My boss wants a standalone application that can do this as it cannot be guaranteed that when we go offsite the company will have that software. He wants the encryption to be able to be carried out on the companies pc so that before we receive the data that column is encrypted.

Any help is appreciated.

EDIT

It's hard for me to describe this idea to you so bare with me.

Basically it will be one application that accepts a text file as input (this is because different sources will have different software and text files are the standard that everyone knows). The user then inputs a password and/or padding string for the encryption and then the application will encrypt the specified number of charters on each line of the text file and output that to another text file.

Example of input data:

|    ID    |    FName    |    SName    |    Number    |    Pcode    |
---------------------------------------------------------------------
|5364gfyue8|    Jason    |    Young    |   65782947   |   BT753HY   |
---------------------------------------------------------------------
|8472hgiek5|     Ben     |    Tops     |   87385942   |   BT439ES   |
---------------------------------------------------------------------
|0243hgqwl4|    Philip   |   Moore     |   73894769   |   BT641II   |


Example of output data:

|    ID          |    FName    |    SName    |    Number    |    Pcode    |
---------------------------------------------------------------------------
|85hftFHDYTE*=jcg|    Jason    |    Young    |   65782947   |   BT753HY   |
---------------------------------------------------------------------------
|5jgj59GUF55=hf4!|     Ben     |    Tops     |   87385942   |   BT439ES   |
---------------------------------------------------------------------------
|jhIOPfd5GF^83=3c|    Philip   |   Moore     |   73894769   |   BT641II   |

-
This is off-topic here — it's a programming question. By the way it sounds like you're looking for a hash function, not an encryption function. – hunter Jun 26 '14 at 11:37
This question appears to be off-topic because it is about programming – hunter Jun 26 '14 at 11:40
@user3770896 - I don't get it either. The only reason you would hash and/or encrypt the column (from what I understand) is if doing so would protect the identity of the person it pertains to. However, you've stated that the column is a random string. Anyway, mysql has native hash and encryption (AES-128-ECB, be careful with that) functions. Doing joins using those functions is trivial... software for this purpose would be a bit over the top. – hunter Jun 26 '14 at 12:38
cleaned up some old comments Thanks for updating. – mikeazo Jun 26 '14 at 15:53