SHA256
Исправить Ed25519 promo-подпись в UI
This commit is contained in:
+2
-2
@@ -1,2 +1,2 @@
|
||||
client.version=1.2.292
|
||||
server.version=1.2.272
|
||||
client.version=1.2.293
|
||||
server.version=1.2.273
|
||||
|
||||
@@ -155,11 +155,12 @@ function parseUsersEconomyConfig(dataBytes) {
|
||||
};
|
||||
}
|
||||
|
||||
function buildEd25519IxData(sig64, pubkey32, msgHash32) {
|
||||
function buildEd25519IxData(sig64, pubkey32, messageBytes) {
|
||||
const sigOff = 16;
|
||||
const pkOff = sigOff + 64;
|
||||
const msgOff = pkOff + 32;
|
||||
const data = new Uint8Array(msgOff + 32);
|
||||
const msg = messageBytes instanceof Uint8Array ? messageBytes : new Uint8Array(messageBytes || []);
|
||||
const data = new Uint8Array(msgOff + msg.length);
|
||||
const view = new DataView(data.buffer);
|
||||
data[0] = 1;
|
||||
data[1] = 0;
|
||||
@@ -168,11 +169,11 @@ function buildEd25519IxData(sig64, pubkey32, msgHash32) {
|
||||
view.setUint16(6, pkOff, true);
|
||||
view.setUint16(8, 0xffff, true);
|
||||
view.setUint16(10, msgOff, true);
|
||||
view.setUint16(12, 32, true);
|
||||
view.setUint16(12, msg.length, true);
|
||||
view.setUint16(14, 0xffff, true);
|
||||
data.set(sig64, sigOff);
|
||||
data.set(pubkey32, pkOff);
|
||||
data.set(msgHash32, msgOff);
|
||||
data.set(msg, msgOff);
|
||||
return data;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user