Example
The following code demonstrates what irrfuscator does when obfuscating a source code project. The file MapResourceManager.as contains some plain as3 code:
Before Source Obfuscationimport flash.utils.ByteArray;
// a resource manager specialized for maps
public class MapResourceManager
extends ResourceManager
{
public static function
canLoadResWithIndex(idx:int):Boolean
{
// if the resource is null, it cannot load
return getResFromIndex(idx) != null;
}
public static function
loadResString(idx:int):String
{
var cl:Class = getResFromIndex(idx);
if (!cl)
return "error";
// convert the data into a text string with
// 'end' suffix.
var data:ByteArray =
new cl as ByteArray;
return data.toString() +
"end.";
}
} // end class
|
After Source Obfuscationimport flash.utils.ByteArray;
public class _wm3952
extends _lc4996
{
public static function
_fi5847(_vr345:int):Boolean
{
return _ya7618(_vr345) != null;
}
public static function
_dm6121(_vr345:int):String
{
var _zu342:Class = _ya7618(_vr345);
if (!_zu342)
return irrcrpt(87, "kzrd");
var _lw654:ByteArray =
new _zu342 as ByteArray;
return _lw654.toString() +
irrcrpt(23, "uzd.");
}
}
|
|
But of course, irrFuscator can do additional source level obfuscation if wished, which is very useful when source code needs to be given away: import flash.utils.ByteArray; public class _wm3952 extends _lc4996 {
public static function _fi5847(idx:int):Boolean { return _ya7618(idx)
!= null; } public static function _dm6121(idx:int):String { var cl:Class =
_ya7618(idx); if (!cl) return irrcrpt(87, "kzrd"); var data:ByteArray =
new cl as ByteArray; return data.toString() + irrcrpt(23, "uzd."); } }
|
|













