Definition bitlength (hashed: list int) (data: list byte) : Z :=
((Zlength hashed * WORD + Zlength data) * 8)%Z.

Lemma bytelist_to_intlist_app:
forall a b,
(WORD | Zlength a) ->
bytelist_to_intlist (a++b) = bytelist_to_intlist a ++ bytelist_to_intlist b.