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/ByteString.as
diff options
context:
space:
mode:
Diffstat (limited to 'signaling-server/node_modules/socket.io/node_modules/socket.io-client/lib/vendor/web-socket-js/flash-src/com/hurlant/util/der/ByteString.as')
-rwxr-xr-xsignaling-server/node_modules/socket.io/node_modules/socket.io-client/lib/vendor/web-socket-js/flash-src/com/hurlant/util/der/ByteString.as43
1 files changed, 43 insertions, 0 deletions
diff --git a/signaling-server/node_modules/socket.io/node_modules/socket.io-client/lib/vendor/web-socket-js/flash-src/com/hurlant/util/der/ByteString.as b/signaling-server/node_modules/socket.io/node_modules/socket.io-client/lib/vendor/web-socket-js/flash-src/com/hurlant/util/der/ByteString.as
new file mode 100755
index 0000000..fb8b280
--- /dev/null
+++ b/signaling-server/node_modules/socket.io/node_modules/socket.io-client/lib/vendor/web-socket-js/flash-src/com/hurlant/util/der/ByteString.as
@@ -0,0 +1,43 @@
+/**
+ * ByteString
+ *
+ * An ASN1 type for a ByteString, represented with a ByteArray
+ * Copyright (c) 2007 Henri Torgemane
+ *
+ * See LICENSE.txt for full license information.
+ */
+package com.hurlant.util.der
+{
+ import flash.utils.ByteArray;
+ import com.hurlant.util.Hex;
+
+ public class ByteString extends ByteArray implements IAsn1Type
+ {
+ private var type:uint;
+ private var len:uint;
+
+ public function ByteString(type:uint = 0x04, length:uint = 0x00) {
+ this.type = type;
+ this.len = length;
+ }
+
+ public function getLength():uint
+ {
+ return len;
+ }
+
+ public function getType():uint
+ {
+ return type;
+ }
+
+ public function toDER():ByteArray {
+ return DER.wrapDER(type, this);
+ }
+
+ override public function toString():String {
+ return DER.indent+"ByteString["+type+"]["+len+"]["+Hex.fromArray(this)+"]";
+ }
+
+ }
+} \ No newline at end of file