October 24, 2026 · 2 min read

SQL Injection
වසර 27ක් පැරණි Security Vulnerability එකක් තවමත් ලෝකයේ ප්රධාන Security අවදානම් 10 අතරට (OWASP Top 10) එන්නේ ඇයි? ඇයි මේ පැරණි Vulnerability එක තවමත් ප්රශ්නයක් වෙන්නේ? SQL Injection කියන්නේ මොකක්ද?
SQL Injection
Why Is a 27 Year Old Security Vulnerability Still Among the World's Top 10 Security Risks (OWASP Top 10)? Why is this old vulnerability still a problem? What is SQL Injection?
Encoding vs Encryption vs Hashing තුනම එකම දේද?
අපි API එකක් හරහා data යවනවා. File එකක් download කරනවා. Website එකක login වෙනවා කියල හිතන්න. මේ හැම තැනකම data processing සහ security ගැන කතා කරනකොට Encoding, Encryption සහ Hashing කියන terms තුන අහන්න ලැබෙනවා. නමුත් මේ තුනේ වෙනස දන්නවාද?
Encoding is the process of converting data into a different format. A common example is Base64 encoding.
We use encoding for API communication, email attachments, and data transfer. Encoding is not encryption. It does not make data confidential.
When using encoding, we can decode the data and retrieve the original information at any time.
Encryption is used to protect sensitive data so that unauthorized users cannot read it. There are two main types of encryption:
Symmetric Encryption: The same key is used to encrypt and decrypt data. It is generally fast and efficient for encrypting large amounts of data. Example: AES.
Asymmetric Encryption: It uses a public key and a private key. The public key is used to encrypt data, while the private key is used to decrypt it. Example: RSA encryption.
In modern HTTPS/TLS, symmetric encryption is generally used to encrypt data, while asymmetric cryptography is used for tasks such as key exchange and authentication.
Hashing generates a hash value from a piece of data. In cryptographic hashing, this is designed to be a one way process.
It should be computationally infeasible to recover the original data from its hash value. We use hashing for file integrity verification, password storage, and digital signature systems.
There are two concepts related to hashing that we often encounter:
Salt: A random value is added to a password before hashing. This helps prevent the same password from producing the same hash value. This value is stored in the database along with the hash value.
Pepper: A secret value added to the hashing process. This secret value is stored separately and securely.
All three affect the representation of data, but their purposes are different!