OP_SHA1

(167 | 0xa7)

Input

1 items

|

Output

1 items

SHA1, or Secure Hash Algorithm 1, is a cryptographic hash function which produces a 160-bit (20-byte) hash value, often rendered as a hexadecimal number that's 40 digits long. Despite its ubiquity in various systems, it's seen declining use in Bitcoin due to vulnerability concerns. The Bitcoin Script opcode OP_SHA1 provides a direct way to compute the SHA-1 hash of data, but in modern Bitcoin protocols, its use is discouraged in favor of more secure algorithms.

OP_Code Walkthrough

Performs the SHA-1 hash function on the top item of the stack.

Pop top item

Apply SHA1 hash

Push hashed item