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

http://github.com/onedayitwillmake/RealtimeMultiplayerNodeJs · ActionScript · 49 lines · 34 code · 7 blank · 8 comment · 0 complexity · c3d20145f3575a30805cf50958a26778 MD5 · raw file

  1. /**
  2. * PrintableString
  3. *
  4. * An ASN1 type for a PrintableString, held within a String
  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 flash.utils.ByteArray;
  12. public class PrintableString implements IAsn1Type
  13. {
  14. protected var type:uint;
  15. protected var len:uint;
  16. protected var str:String;
  17. public function PrintableString(type:uint, length:uint) {
  18. this.type = type;
  19. this.len = length;
  20. }
  21. public function getLength():uint
  22. {
  23. return len;
  24. }
  25. public function getType():uint
  26. {
  27. return type;
  28. }
  29. public function setString(s:String):void {
  30. str = s;
  31. }
  32. public function getString():String {
  33. return str;
  34. }
  35. public function toString():String {
  36. return DER.indent+str;
  37. }
  38. public function toDER():ByteArray {
  39. return null; // XXX not implemented
  40. }
  41. }
  42. }