From b60df56157ee1fd0bd4938799bac05a62fda91a1 Mon Sep 17 00:00:00 2001 From: lookshe Date: Sat, 14 Mar 2015 20:45:20 +0100 Subject: initial commit from working version --- .../flash-src/com/hurlant/util/Hex.as | 66 ++++++++++++++++++++++ 1 file changed, 66 insertions(+) create mode 100755 signaling-server/node_modules/socket.io/node_modules/socket.io-client/lib/vendor/web-socket-js/flash-src/com/hurlant/util/Hex.as (limited to 'signaling-server/node_modules/socket.io/node_modules/socket.io-client/lib/vendor/web-socket-js/flash-src/com/hurlant/util/Hex.as') diff --git a/signaling-server/node_modules/socket.io/node_modules/socket.io-client/lib/vendor/web-socket-js/flash-src/com/hurlant/util/Hex.as b/signaling-server/node_modules/socket.io/node_modules/socket.io-client/lib/vendor/web-socket-js/flash-src/com/hurlant/util/Hex.as new file mode 100755 index 0000000..98d887b --- /dev/null +++ b/signaling-server/node_modules/socket.io/node_modules/socket.io-client/lib/vendor/web-socket-js/flash-src/com/hurlant/util/Hex.as @@ -0,0 +1,66 @@ +/** + * Hex + * + * Utility class to convert Hex strings to ByteArray or String types. + * Copyright (c) 2007 Henri Torgemane + * + * See LICENSE.txt for full license information. + */ +package com.hurlant.util +{ + import flash.utils.ByteArray; + + public class Hex + { + /** + * Support straight hex, or colon-laced hex. + * (that means 23:03:0e:f0, but *NOT* 23:3:e:f0) + * Whitespace characters are ignored. + */ + public static function toArray(hex:String):ByteArray { + hex = hex.replace(/\s|:/gm,''); + var a:ByteArray = new ByteArray; + if (hex.length&1==1) hex="0"+hex; + for (var i:uint=0;i