PageRenderTime 20ms CodeModel.GetById 17ms RepoModel.GetById 1ms app.codeStats 0ms

/js/lib/Socket.IO-node/support/socket.io-client/lib/vendor/web-socket-js/flash-src/com/hurlant/util/der/Integer.as

http://github.com/onedayitwillmake/RealtimeMultiplayerNodeJs
ActionScript | 44 lines | 29 code | 7 blank | 8 comment | 0 complexity | 562e97ddb59bf67515b13e9cd8267397 MD5 | raw file
Possible License(s): GPL-2.0, LGPL-2.1, MPL-2.0-no-copyleft-exception, BSD-3-Clause
  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. */
  9. package com.hurlant.util.der
  10. {
  11. import com.hurlant.math.BigInteger;
  12. import flash.utils.ByteArray;
  13. public class Integer extends BigInteger implements IAsn1Type
  14. {
  15. private var type:uint;
  16. private var len:uint;
  17. public function Integer(type:uint, length:uint, b:ByteArray) {
  18. this.type = type;
  19. this.len = length;
  20. super(b);
  21. }
  22. public function getLength():uint
  23. {
  24. return len;
  25. }
  26. public function getType():uint
  27. {
  28. return type;
  29. }
  30. override public function toString(radix:Number=0):String {
  31. return DER.indent+"Integer["+type+"]["+len+"]["+super.toString(16)+"]";
  32. }
  33. public function toDER():ByteArray {
  34. return null;
  35. }
  36. }
  37. }