aboutsummaryrefslogtreecommitdiffstats
path: root/signaling-server/node_modules/socket.io/node_modules/socket.io-client/lib/vendor/web-socket-js/flash-src/com/hurlant/util/der/Integer.as
blob: e2f045c9cfb00a3a9aeb6801356378e0cc5917f0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
/**
 * Integer
 * 
 * An ASN1 type for an Integer, represented with a BigInteger
 * Copyright (c) 2007 Henri Torgemane
 * 
 * See LICENSE.txt for full license information.
 */
package com.hurlant.util.der
{
	import com.hurlant.math.BigInteger;
	import flash.utils.ByteArray;

	public class Integer extends BigInteger implements IAsn1Type
	{
		private var type:uint;
		private var len:uint;
		
		public function Integer(type:uint, length:uint, b:ByteArray) {
			this.type = type;
			this.len = length;
			super(b);
		}
		
		public function getLength():uint
		{
			return len;
		}
		
		public function getType():uint
		{
			return type;
		}
		
		override public function toString(radix:Number=0):String {
			return DER.indent+"Integer["+type+"]["+len+"]["+super.toString(16)+"]";
		}
		
		public function toDER():ByteArray {
			return null;
		}
		
	}
}