Handbook
Glossary
>ber ( obj -- byte-array )
Vocabulary
asn1
Inputs
obj
an
object
Outputs
byte-array
an
object
Definition
IN:
asn1
GENERIC:
>ber
( obj -- byte-array )
Methods
USING:
arrays
asn1
;
M:
array
>ber
48
>ber-seq-internal
;
USING:
arrays
asn1
kernel
math
pack
sequences
;
M:
bignum
>ber
>128-ber
dup
length
dup
126
>
[
"range error in bignum"
throw
]
[
2
swap
2array
"CC"
pack-native
B{
}
prepend-as
]
if
;
USING:
arrays
asn1
kernel
math
pack
sequences
;
M:
fixnum
>ber
>128-ber
dup
length
2
swap
2array
"cc"
pack-native
B{
}
prepend-as
;
USING:
accessors
arrays
asn1
byte-arrays
kernel
namespaces
pack
sequences
strings
;
M:
string
>ber
tagnum
get
value>>
1array
"C"
pack-native
swap
dup
length
>ber-length-encoding
swapd
append
swap
>byte-array
append
;