Handbook
Glossary
ripemd-160-state
Vocabulary
checksums
.
ripemd
Definition
USING:
checksums.common
specialized-arrays.instances.alien.c-types.uint
;
IN:
checksums.ripemd
TUPLE:
ripemd-160-state
<
block-checksum-state
{
state1
uint-array
initial:
uint-array{
}
}
{
state2
uint-array
initial:
uint-array{
}
}
{
old-state
uint-array
initial:
uint-array{
}
}
;
Methods
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.ripemd
generic
kernel
;
M:
ripemd-160-state
clone
M\
ripemd-160-state
clone
(call-next-method)
[
clone
]
change-state1
[
clone
]
change-state2
[
clone
]
change-old-state
;
USING:
accessors
checksums
checksums.common
checksums.ripemd
checksums.ripemd.private
kernel
sequences
;
M:
ripemd-160-state
get-checksum
clone
[
bytes>>
f
]
[
bytes-read>>
pad-last-block
]
[
]
tri
[
[
checksum-block
]
curry
each
]
[
ripemd-160>checksum
]
bi
;