nerdexam
CompTIA

SY0-701 · Question #687

An engineer needs to ensure that a script has not been modified before it is launched. Which of the following best provides this functionality?

The correct answer is C. Hashing. Hashing is correct because it generates a fixed-length digest (fingerprint) of a file's contents - if even one byte changes, the hash changes. Before launching a script, you compute its hash and compare it against a known-good value; a mismatch proves tampering occurred. This…

Submitted by haruto_sh· Mar 6, 2026General security concepts

Question

An engineer needs to ensure that a script has not been modified before it is launched. Which of the following best provides this functionality?

Options

  • AMasking
  • BObfuscation
  • CHashing
  • DEncryption

How the community answered

(44 responses)
  • A
    2% (1)
  • B
    7% (3)
  • C
    89% (39)
  • D
    2% (1)

Explanation

Hashing is correct because it generates a fixed-length digest (fingerprint) of a file's contents - if even one byte changes, the hash changes. Before launching a script, you compute its hash and compare it against a known-good value; a mismatch proves tampering occurred. This is exactly how tools like sha256sum or code-signing pipelines verify integrity.

Masking (A) hides sensitive data (e.g., replacing credit card digits with ****) - it has nothing to do with detecting modifications. Obfuscation (B) makes code harder to read, but does not detect whether it was changed. Encryption (D) protects data confidentiality in transit or at rest, but decrypting a file tells you nothing about whether it was altered before encryption.

Memory tip: Think "Hash = fingerprint for integrity." Just as a fingerprint uniquely identifies a person, a hash uniquely identifies a file's exact contents - any change leaves a different fingerprint behind.

Topics

#Hashing#Integrity verification#Data integrity#Script integrity

Community Discussion

No community discussion yet for this question.

Full SY0-701 Practice