|
5精币
package gui.uilogic.utlis
{
import flash.filesystem.File;
import flash.filesystem.FileMode;
import flash.filesystem.FileStream;
public class IntUtil
{
private static var hexChars:String = "0123456789abcdef";
public static var AppFile:File = new File();
public static var AppPath:String = File.applicationDirectory.nativePath;
public function IntUtil()
{
super();
}
public static function rol(param1:int, param2:int) : int
{
return param1 << param2 | param1 >>> 32 - param2;
}
public static function ror(param1:int, param2:int) : uint
{
var _loc3_:int = 32 - param2;
return param1 << _loc3_ | param1 >>> 32 - _loc3_;
}
public static function toHex(param1:int, param2:Boolean = false) : String
{
var _loc5_:int = 0;
var _loc4_:int = 0;
var _loc3_:String = "";
if(param2)
{
_loc5_ = 0;
while(_loc5_ < 4)
{
_loc3_ = _loc3_ + (hexChars.charAt(param1 >> (3 - _loc5_) * 8 + 4 & 15) + hexChars.charAt(param1 >> (3 - _loc5_) * 8 & 15));
_loc5_++;
}
}
else
{
_loc4_ = 0;
while(_loc4_ < 4)
{
_loc3_ = _loc3_ + (hexChars.charAt(param1 >> _loc4_ * 8 + 4 & 15) + hexChars.charAt(param1 >> _loc4_ * 8 & 15));
_loc4_++;
}
}
return _loc3_;
}
public static function writeXMLFile(xml:XML) : void
{
var stream:FileStream = new FileStream();
AppFile.nativePath = AppPath + "\\Config\\Config.xml";
var xmlFile:File = new File(AppFile.nativePath);
var outputString:String = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n";
outputString = outputString + xml.toXMLString();
outputString = outputString.replace("//n/g",File.lineEnding);
stream = new FileStream();
stream.open(xmlFile,FileMode.WRITE);
stream.writeUTFBytes(outputString);
stream.close();
}
}
}
看不懂Flash,求大神翻译成易语言,或者对应的解密易语言
|
最佳答案
查看完整内容
toHex 使用精易模块的 进制_十到十六 即可
补充内容 (2020-10-23 23:56):
ror 是左移,ror 是右移 易语言自带。
|