Handbook
Glossary
>ber-length-encoding ( n -- byte-array )
Vocabulary
asn1
Inputs
n
an
object
Outputs
byte-array
an
object
Definition
USING:
arrays
kernel
math
pack
sequences
;
IN:
asn1
:
>ber-length-encoding
( n -- byte-array )
dup
127
<=
[
1array
"C"
pack-be
]
[
1array
"I"
pack-be
0
swap
remove
dup
length
128
+
1array
"C"
pack-be
B{
}
prepend-as
]
if
;