Handbook
Glossary
checksum-block ( bytes checksum-state -- )
Vocabulary
checksums
.
common
Inputs
bytes
an
object
checksum-state
an
object
Outputs
None
Definition
IN:
checksums.common
GENERIC:
checksum-block
( bytes checksum-state -- )
Methods
USING:
accessors
alien.c-types
alien.data
checksums.common
checksums.md5
checksums.md5.private
combinators
kernel
;
M:
md5-state
checksum-block
[
[
byte-array>le
uint
cast-array
]
[
state>>
]
bi*
{
[
(process-md5-block-F)
]
[
(process-md5-block-G)
]
[
(process-md5-block-H)
]
[
(process-md5-block-I)
]
}
2cleave
]
[
update-md5
]
bi
;
USING:
accessors
alien.c-types
alien.data
checksums.common
checksums.ripemd
checksums.ripemd.private
combinators
kernel
;
M:
ripemd-160-state
checksum-block
[
[
byte-array>le
uint
cast-array
]
dip
[
state1>>
{
[
(process-ripemd-160-block-F1)
]
[
(process-ripemd-160-block-G1)
]
[
(process-ripemd-160-block-H1)
]
[
(process-ripemd-160-block-I1)
]
[
(process-ripemd-160-block-J1)
]
}
2cleave
]
[
state2>>
{
[
(process-ripemd-160-block-J2)
]
[
(process-ripemd-160-block-I2)
]
[
(process-ripemd-160-block-H2)
]
[
(process-ripemd-160-block-G2)
]
[
(process-ripemd-160-block-F2)
]
}
2cleave
]
2bi
]
[
update-ripemd-160
]
bi
;
USING:
accessors
checksums.common
checksums.sha.private
kernel
;
M::
sha1-state
checksum-block
( bytes state -- )
bytes
prepare-sha1-message-schedule
state
W<<
state
[
H>>
clone
]
[
W>>
]
[
K>>
]
tri
state
process-sha1-chunk
;
USING:
accessors
checksums.common
checksums.sha.private
kernel
;
M:
sha2-short
checksum-block
[
prepare-message-schedule
]
[
[
block-size>>
]
[
H>>
clone
]
[
]
tri
process-chunk
]
bi
;