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/PrintableString.as
blob: ed1775e278d508d1650cf43328806ee292ce68f6 (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
45
46
47
48
49
/**
 * PrintableString
 * 
 * An ASN1 type for a PrintableString, held within a String
 * Copyright (c) 2007 Henri Torgemane
 * 
 * See LICENSE.txt for full license information.
 */
package com.hurlant.util.der
{
	import flash.utils.ByteArray;
	
	public class PrintableString implements IAsn1Type
	{
		protected var type:uint;
		protected var len:uint;
		protected var str:String;
		
		public function PrintableString(type:uint, length:uint) {
			this.type = type;
			this.len = length;
		}
		
		public function getLength():uint
		{
			return len;
		}
		
		public function getType():uint
		{
			return type;
		}
		
		public function setString(s:String):void {
			str = s;
		}
		public function getString():String {
			return str;
		}
		
		public function toString():String {
			return DER.indent+str;
		}
		
		public function toDER():ByteArray {
			return null; // XXX not implemented
		}
	}
}