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.

Preparing for an interview?

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

← All Security & DevSecOps questions