As more and more people start to use online services for day-to-day living, it is inevitable that more and more personal information ends up out in the digital world.
As security becomes a primary concern for more customers across the globe it is important to stay on top of your security.
If you are web developer or web application developer you will know that encryption of certain data is crucial to ensuring the security of your platform, such as user passwords.
At the very core of all the different types of encryption that are available is two key different types of encryption, one-way encryption and two-way encryption.
One-way encryption is essentially the passing of a variable or user input through a hashing sequence, such as MD5 or SHA1. This type of encryption will replace the string with a lengthy string of random characters in place of the input. Even if a user inputs a blank value into a field with SHA1 or MD5 encryption it will be replaced with a lengthy string of random characters.
Two-way encryption essentially requires the creation of an alpha-numeric and special character map. A character map would define what string is equal to the letter 'A', what string is equal to 'B' and so on, with every letter in the alphabet, number 0 to 9 and all special characters each being given a value in the character map.
Upon saving the data from this two-way encrypted field, each letter and character is replaced with the character map value for that letter and each string is split by a known character that is not used in any of the character map definitions, such as a comma or pipe.
This string is then saved into the database as an encrypted string however since you have a list of what each character is equal to, you can use the decoder to display the encrypted value in the database as plain text to a user that is logged into your system and viewing a field.
Your selection of utilising one-way encryption or two-way encryption ultimately comes back to the structure of the organisation that requires the platform. If for example you are dealing with a company that has customers on the phone and speaking with live operators, you would probably lean more towards two-way encryption so that the user in the office can read the secure data in plain text.
You can download a free encryption and decryption script from our scripts section.