diff options
Diffstat (limited to 'BERTLVStream.st')
-rw-r--r-- | BERTLVStream.st | 44 |
1 files changed, 42 insertions, 2 deletions
diff --git a/BERTLVStream.st b/BERTLVStream.st index ff15bc4..3aff0ef 100644 --- a/BERTLVStream.st +++ b/BERTLVStream.st @@ -60,6 +60,46 @@ Object subclass: BERTag [ yourself ] + BERTag class >> endOfContents [ + <category: 'x690 types'> + ^ self fromTuple: #(0 false 0) + ] + + BERTag class >> boolean [ + <category: 'x690 types'> + ^ self fromTuple: #(0 false 1) + ] + + BERTag class >> integer [ + <category: 'x690 types'> + ^ self fromTuple: #(0 false 2) + ] + + BERTag class >> octetString [ + <category: 'x690 types'> + ^ self fromTuple: #(0 false 4) + ] + + BERTag class >> null [ + <category: 'x690 types'> + ^ self fromTuple: #(0 false 5) + ] + + BERTag class >> enumerated [ + <category: 'x690 types'> + ^ self fromTuple: #(0 false 10) + ] + + BERTag class >> sequence [ + <category: 'x690 types'> + ^ self fromTuple: #(0 true 16) + ] + + BERTag class >> set [ + <category: 'x690 types'> + ^ self fromTuple: #(0 true 17) + ] + initialize [ <category: 'init'> classType := BERTag classUniversal. @@ -92,7 +132,7 @@ Object subclass: BERTag [ <category: 'decoding'> classType := aTuple first bitAnd: 16r3. - constructed := aTuple second not. + constructed := aTuple second. tagValue := aTuple third. ] @@ -135,6 +175,6 @@ Object subclass: BERTag [ asTuple [ <category: 'conversion'> - ^ Array with: self classType with: self isPrimitive with: self tagValue. + ^ Array with: self classType with: self isConstructed with: self tagValue. ] ] |