A
le 2.9 new RSA
le key change le top et le bottom tout les 10 min
le dofus verif si le clé crée par le server dofus ou nn
si tu write en byte le valeur negative sera positive 256 + (key(i) Mod 256)
et finalment :
class de 2.8
le key change le top et le bottom tout les 10 min
le dofus verif si le clé crée par le server dofus ou nn
si tu write en byte le valeur negative sera positive 256 + (key(i) Mod 256)
et finalment :
Code:
public function setPublicKey(param1:Vector.<int>) : void
{
var _loc_2:* = new ByteArray();
var _loc_3:int = 0;
while (_loc_3 < param1.length)
{
_loc_2.writeByte(param1[_loc_3]);
_loc_3++;
}
_loc_2.position = 0;
var _loc_4:* = new ByteArray();
var _loc_5:* = PEM.readRSAPublicKey((new this._verifyKey() as ByteArray).readUTFBytes((new this._verifyKey() as ByteArray).length));
PEM.readRSAPublicKey((new this._verifyKey() as ByteArray).readUTFBytes((new this._verifyKey() as ByteArray).length)).verify(_loc_2, _loc_4, _loc_2.length);
this._publicKey = "-----BEGIN PUBLIC KEY-----\n" + Base64.encodeByteArray(_loc_4) + "-----END PUBLIC KEY-----";
return;
}// end function
Code:
public function setPublicKey(param1:Vector.<int>) : void
{
var _loc_2:* = new ByteArray();
var _loc_3:int = 0;
while (_loc_3 < param1.length)
{
_loc_2.writeByte(param1[_loc_3]);
_loc_3++;
}
var _loc_4:* = Base64.encodeByteArray(_loc_2);
this._publicKey = "-----BEGIN PUBLIC KEY-----\n" + _loc_4 + "-----END PUBLIC KEY-----";
return;
}// end function