4 * An ASN1 type for a ByteString, represented with a ByteArray
5 * Copyright (c) 2007 Henri Torgemane
7 * See LICENSE.txt for full license information.
9 package com.hurlant.util.der
11 import flash.utils.ByteArray;
12 import com.hurlant.util.Hex;
14 public class ByteString extends ByteArray implements IAsn1Type
16 private var type:uint;
19 public function ByteString(type:uint = 0x04, length:uint = 0x00) {
24 public function getLength():uint
29 public function getType():uint
34 public function toDER():ByteArray {
35 return DER.wrapDER(type, this);
38 override public function toString():String {
39 return DER.indent+"ByteString["+type+"]["+len+"]["+Hex.fromArray(this)+"]";