Hash160 function.
(hash160 bytes) → hash
This is SHA-256 followed by RIPEMD-160.
It is sometimes called `Hash160',
e.g. see the
Function:
(defun hash160 (bytes) (declare (xargs :guard (byte-listp bytes))) (declare (xargs :guard (< (len bytes) (expt 2 61)))) (let ((__function__ 'hash160)) (declare (ignorable __function__)) (ripemd-160-bytes (sha-256-bytes bytes))))
Theorem:
(defthm byte-listp-of-hash160 (b* ((hash (hash160 bytes))) (byte-listp hash)) :rule-classes :rewrite)
Theorem:
(defthm len-of-hash160 (b* ((hash (hash160 bytes))) (equal (len hash) 20)) :rule-classes :rewrite)