] unit-test
[ B{ 133 6 97 98 99 100 101 102 } ] [
- 5 "abcdef" >ber-contextspecific
+ 5 "abcdef" >ber-contextspecific-string
] unit-test
! triggers array
] unit-test
[ B{ 160 4 49 50 51 52 } ] [
- { 1 2 3 4 } >ber-contextspecific
+ { 1 2 3 4 } >ber-contextspecific-array
] unit-test
] with-ber
: >ber-application-string ( n str -- byte-array )
[ HEX: 40 + set-tag ] dip >ber ;
-GENERIC: >ber-contextspecific ( n obj -- byte-array )
-M: string >ber-contextspecific ( n str -- byte-array )
+: >ber-contextspecific-string ( n str -- byte-array )
[ HEX: 80 + set-tag ] dip >ber ;
! =========================================================
: >ber-appsequence ( array -- byte-array )
HEX: 60 >ber-seq-internal ;
-M: array >ber-contextspecific ( array -- byte-array )
+: >ber-contextspecific-array ( array -- byte-array )
HEX: A0 >ber-seq-internal ;