More precise definition of chunks

Use `padding` directly in the definition of `chunks`, giving an aligned
value to the division.
This commit is contained in:
Trevor Elliott 2017-03-27 16:37:55 -07:00
parent b93f84cf78
commit 5a43c1d1fe

View File

@ -127,7 +127,7 @@ pad : {msgLen,contentLen,chunks,padding}
( fin msgLen
, 64 >= width msgLen // message width fits in a word
, contentLen == msgLen + 65 // message + header
, chunks == (contentLen+511) / 512
, chunks == (contentLen+padding) / 512
, padding == (512 - contentLen % 512) % 512 // prettier if type #'s could be < 0
)
=> [msgLen] -> [chunks][512]