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
- What is DevSecOps, and how does it differ from traditional security gating at the end? [Basic]
- What does shift-left security mean, and why does it matter? [Basic]
- What is the difference between SAST, DAST, IAST, and SCA? [Basic]
- When in the pipeline does each of SAST, DAST, and SCA run? [Basic]
- What is the difference between SAST and DAST, and what does each catch and miss? [Basic]
- What is software composition analysis (SCA), and why does it matter for dependencies? [Basic]
- What is SonarQube, and what does it analyse? [Basic]
- Is SonarQube primarily SAST, code quality, or both? [Basic]