/js/lib/Socket.IO-node/support/socket.io-client/lib/vendor/web-socket-js/flash-src/com/hurlant/util/der/ByteString.as
http://github.com/onedayitwillmake/RealtimeMultiplayerNodeJs · ActionScript · 43 lines · 28 code · 7 blank · 8 comment · 0 complexity · a2b660f7970ef36aeb6a0c5a28302b05 MD5 · raw file
- /**
- * ByteString
- *
- * An ASN1 type for a ByteString, represented with a ByteArray
- * Copyright (c) 2007 Henri Torgemane
- *
- * See LICENSE.txt for full license information.
- */
- package com.hurlant.util.der
- {
- import flash.utils.ByteArray;
- import com.hurlant.util.Hex;
- public class ByteString extends ByteArray implements IAsn1Type
- {
- private var type:uint;
- private var len:uint;
-
- public function ByteString(type:uint = 0x04, length:uint = 0x00) {
- this.type = type;
- this.len = length;
- }
-
- public function getLength():uint
- {
- return len;
- }
-
- public function getType():uint
- {
- return type;
- }
-
- public function toDER():ByteArray {
- return DER.wrapDER(type, this);
- }
-
- override public function toString():String {
- return DER.indent+"ByteString["+type+"]["+len+"]["+Hex.fromArray(this)+"]";
- }
-
- }
- }