53 строки
1,9 КиБ
MQL5
53 строки
1,9 КиБ
MQL5
//+------------------------------------------------------------------+
|
|
//| IntTest.mq5 |
|
|
//| Copyright 2026, Niquel Mendoza |
|
|
//| https://www.mql5.com |
|
|
//+------------------------------------------------------------------+
|
|
#property copyright "Copyright 2026, Niquel Mendoza"
|
|
#property link "https://www.mql5.com"
|
|
#property version "1.00"
|
|
#property strict
|
|
|
|
|
|
//+------------------------------------------------------------------+
|
|
//| |
|
|
//+------------------------------------------------------------------+
|
|
#include "Iteradores.mqh"
|
|
#include <TSN\\BInt\\NUtils.mqh>
|
|
//+------------------------------------------------------------------+
|
|
//| |
|
|
//+------------------------------------------------------------------+
|
|
#resource "SHA3_512ShortMsg.rsp" as const string g_raw
|
|
//+------------------------------------------------------------------+
|
|
//| Script program start function |
|
|
//+------------------------------------------------------------------+
|
|
void OnStart()
|
|
{
|
|
//---
|
|
//---
|
|
TSN::CRSPParser rsp;
|
|
|
|
//---
|
|
rsp.Assing(g_raw);
|
|
rsp.CorrectPadding();
|
|
rsp.Parse();
|
|
|
|
TSN::CRSPNode node = rsp.GetRoot();
|
|
node.MoveNextPositionsThis(3); // siguiente triplete
|
|
|
|
//---
|
|
const string keys[3] = {"Len", "Msg", "MD"};
|
|
CRSPIteratorHashFast(3) it = node.MakeHashIterator<MQLA_B(3), TSN::CGenericHash_string>(keys);
|
|
|
|
uchar buf[];
|
|
TSN::CRSPNode msg = it.At(0)["MD"].Value();
|
|
Print(msg.ToString());
|
|
const int t = msg.HexToBytes(buf);
|
|
|
|
string out = "";
|
|
TSN::CHexUtils::BytesToHexLower(buf, t, out);
|
|
|
|
Print(out);
|
|
|
|
}
|
|
//+------------------------------------------------------------------+
|