Interview › Security & DevSecOps
What is the difference between encoding, encryption, and hashing? [Advanced]
Answer
Encoding changes data representation, encryption protects confidentiality and can be reversed with a key, and hashing produces a one-way digest for integrity or password verification. They solve different problems and should not be used interchangeably.
Technical explanation
Base64 is encoding, not encryption; anyone can decode it.
Encryption is reversible by authorized parties with the right key.
Cryptographic hashing is one-way; password hashing should use slow adaptive algorithms with salt, such as bcrypt, scrypt, or Argon2.
Hands-on example
Example: use URL encoding for safe URL parameters, AES-GCM/KMS for storing sensitive reversible data, SHA-256 for file integrity checks, and Argon2id or bcrypt with unique salt for password storage.
Check how well your resume matches the role with our free resume checker— match score, ATS check, and the skills you're missing.
More Security & DevSecOps interview questions
- Why do you hash and salt passwords rather than encrypt them? [Advanced]
- How do you prevent privilege escalation in a Kubernetes cluster? [Advanced]
- What are Kubernetes Pod Security Standards (privileged, baseline, restricted)? [Advanced]
- What are Linux capabilities, and why drop them in containers? [Advanced]
- What is the difference between a WAF, an IDS, and an IPS? [Advanced]
- What is the difference between authentication and authorization? [Advanced]
- What is certificate management, and how do tools like cert-manager help? [Advanced]
- How do you prove to an auditor that security controls are enforced continuously, not just documented? [Advanced]