make asn1 work again

db4
Doug Coleman 2009-01-19 22:24:30 -06:00
parent 478fca5dc6
commit 0c7ff04ce7
1 changed files with 18 additions and 0 deletions

View File

@ -7,6 +7,24 @@ math.parser namespaces make pack strings sequences accessors ;
IN: asn1 IN: asn1
<PRIVATE
: (>128-ber) ( n -- )
dup 0 > [
[ HEX: 7f bitand HEX: 80 bitor , ] keep -7 shift
(>128-ber)
] [
drop
] if ;
PRIVATE>
: >128-ber ( n -- str )
[
[ HEX: 7f bitand , ] keep -7 shift
(>128-ber)
] { } make reverse ;
: tag-classes ( -- seq ) : tag-classes ( -- seq )
{ "universal" "application" "context_specific" "private" } ; { "universal" "application" "context_specific" "private" } ;