Guia de entrevista · Security

Hashing vs encryption?

do caderno de estudos · atualizado em 2 de outubro de 2026
Para quem vai encarar entrevista de Security2 min

Pergunta comum em entrevista de Security. A resposta abaixo está em inglês, do jeito que dá para falar numa entrevista: leia, feche e tente explicar com as suas palavras.

A resposta, como você fala na entrevista

A hash maps input to a digest without a decryption key. Attackers can still guess inputs and compare hashes. Store passwords using a password-hashing function with a unique salt and suitable work parameters, preferably Argon2id where supported. Fast general-purpose hashes alone are unsuitable. bcrypt is mainly a legacy option with limits that must be handled.
Encryption is reversible with the right key. TLS protects data in transit. At-rest encryption needs a defined algorithm, key management, and access policy. AWS KMS manages keys and cryptographic operations, but naming KMS alone does not encrypt every application field.

Source: OWASP password storage.

Ler é o primeiro passo. No app, essa pergunta vira flashcard com repetição espaçada, e o módulo tem quiz e simulado para testar o que ficou.

Treinar essa pergunta no app