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: Are They All the Same?
Imagine you are sending data through an API, downloading a file, or logging into a website. Whenever we talk about data processing and security in these situations, we often come across three terms: Encoding, Encryption, and Hashing. But do you know the difference between them?
Data එකක් වෙනත් format එකකට convert කිරීමයි Encoding. උදාහරණයක් ගත්තොත් Base64 encoding.
අපි මේක use කරනවා API communication, email attachments සහ data transfer කරන්න.
Encoding කියන්නේ encryption එකක් නෙවෙයි. එය data එක රහසිගත(Confidential) කරන්නේ නැහැ. ඕනෑම වෙලාවක අපිට decode කරලා data ගන්න පුළුවන් encoding වලදී.
Sensitive data එකක් unauthorized users ලාට කියවන්න බැරි විදිහට ආරක්ෂා කරන්න Encryption භාවිතා කරනවා.
මෙතනදි අපිට ප්රධාන වර්ග දෙකක් හම්බෙනවා.
Symmetric Encryption: Encrypt සහ decrypt කරන්න එකම key එක භාවිතා කරනවා. මේක සාමාන්යයෙන් fast සහ විශාල data ප්රමාණයක් encrypt කරන්න කාර්යක්ෂමයි. උදා: AES.
Asymmetric Encryption: Public key සහ private key භාවිතා කරනවා. Public key එක use කරනවා data encrypt කරන්න, private key එක use කරනවා decrypt කරන්න. උදා: RSA encryption.
Modern HTTPS/TLS වලදී data encrypt කිරීමට සාමාන්යයෙන් symmetric encryption භාවිතා කරන අතර, asymmetric cryptography key exchange සහ authentication වැනි කාර්යයන් සඳහා භාවිතා කරනවා.
Hashing මඟින් data එකකින් hash value එකක් නිර්මාණය කරනවා. Cryptographic hashing වලදී මෙය one way process එකක් ලෙස නිර්මාණය කර තිබෙනවා.
Hash value එකෙන් මුල් data එක නැවත ලබාගැනීම computationally infeasible(කල නොහැකි) විය යුතුයි.
අපි මේක use කරනවා File integrity verification, password storage සහ digital signature systems වලදී.
Hashing එකේ concepts දෙකක් අපිට හම්බෙනව
Salt: Password එකකට random value එකක් එකතු කරනවා. එකම password එකට එකම hash එක ලැබීම වළක්වන්න උපකාරී වෙනවා. මේ value එක hash value එකත් එක්ක database එකේ save කරනවා.
Pepper: Hashing process එකට එකතු කරන secret value එකක්. මේ secret value එක වෙනම ආරක්ෂිතව තබාගන්නවා.
මේ තුනම data එකේ representation එකට බලපානවා. නමුත් ඒවායේ අරමුණු වෙනස්!