PageRenderTime 102ms CodeModel.GetById 60ms app.highlight 3ms RepoModel.GetById 38ms app.codeStats 0ms

/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 */
 9package com.hurlant.util.der
10{
11	import flash.utils.ByteArray;
12	
13	public class PrintableString implements IAsn1Type
14	{
15		protected var type:uint;
16		protected var len:uint;
17		protected var str:String;
18		
19		public function PrintableString(type:uint, length:uint) {
20			this.type = type;
21			this.len = length;
22		}
23		
24		public function getLength():uint
25		{
26			return len;
27		}
28		
29		public function getType():uint
30		{
31			return type;
32		}
33		
34		public function setString(s:String):void {
35			str = s;
36		}
37		public function getString():String {
38			return str;
39		}
40		
41		public function toString():String {
42			return DER.indent+str;
43		}
44		
45		public function toDER():ByteArray {
46			return null; // XXX not implemented
47		}
48	}
49}