/js/lib/Socket.IO-node/support/socket.io-client/lib/vendor/web-socket-js/flash-src/com/hurlant/util/der/Integer.as
ActionScript | 44 lines | 29 code | 7 blank | 8 comment | 0 complexity | 562e97ddb59bf67515b13e9cd8267397 MD5 | raw file
1/** 2 * Integer 3 * 4 * An ASN1 type for an Integer, represented with a BigInteger 5 * Copyright (c) 2007 Henri Torgemane 6 * 7 * See LICENSE.txt for full license information. 8 */ 9package com.hurlant.util.der 10{ 11 import com.hurlant.math.BigInteger; 12 import flash.utils.ByteArray; 13 14 public class Integer extends BigInteger implements IAsn1Type 15 { 16 private var type:uint; 17 private var len:uint; 18 19 public function Integer(type:uint, length:uint, b:ByteArray) { 20 this.type = type; 21 this.len = length; 22 super(b); 23 } 24 25 public function getLength():uint 26 { 27 return len; 28 } 29 30 public function getType():uint 31 { 32 return type; 33 } 34 35 override public function toString(radix:Number=0):String { 36 return DER.indent+"Integer["+type+"]["+len+"]["+super.toString(16)+"]"; 37 } 38 39 public function toDER():ByteArray { 40 return null; 41 } 42 43 } 44}