Schau, wie man Roboter kostenlos herunterladen kann
Finden Sie uns auf Twitter!
und werden Sie Mitglied unserer Fangruppe
Interessantes Skript?
Veröffentliche einen Link auf das Skript, damit die anderen ihn auch nutzen können
Hat Ihnen das Skript gefallen?
Bewerten Sie es im Terminal MetaTrader 5
Bibliotheken

SHA256, SHA384 and SHA512 + HMAC - Bibliothek für den MetaTrader 4

Ansichten:
9765
Rating:
(15)
Veröffentlicht:
2018.06.14 13:02
\MQL4\Include\
SHA256.mqh (15.71 KB) ansehen
SHA384.mqh (18.43 KB) ansehen
SHA512.mqh (18.52 KB) ansehen
\MQL4\Experts\
SHA_HMAC.mq4 (1.85 KB) ansehen
Benötigen Sie einen Roboter oder Indikator, der auf diesem Code basiert? Bestellen Sie ihn im Freelance-Bereich Zum Freelance

Many developers need these functions, while working with different kinds of external APIs, like Bitcoin and altcoin exchanges where it is often necessary to send data with the confirmation of parameters validity through HMAC-SHA512, HMAC-SHA384 and HMAC-SHA256.

The MQL5 version of SHA512 library can be found here: https://www.mql5.com/en/code/18158. Besides SHA512, added SHA256 and SHA384 support in form of separate libraries.

HMAC functions were ported from https://en.wikipedia.org/wiki/Hash-based_message_authentication_code

Use example (tested on http://www.freeformatter.com/hmac-generator.html)

#include <SHA256.mqh>
#include <SHA384.mqh>
#include <SHA512.mqh>

input string phrase = "The quick brown fox jumps over the lazy dog";
input string phrase_key = "ABCDEFG";

void Start()
  {
   SHA256 hash256;
   Print("SHA256:",hash256.hmac(phrase,phrase_key));

   SHA384 hash384;
   Print("SHA384:",hash384.hmac(phrase,phrase_key));

   SHA512 hash512;
   Print("SHA512:",hash512.hmac(phrase,phrase_key));
  }
Martingale VI Hybrid Martingale VI Hybrid

A martingale strategy, an old EA that was rebuilt to be efficient.

Average Volume per Hour Average Volume per Hour

Calculate the average volume per hour in a 1 hour chart.

s-Downloader (SingleTF) s-Downloader (SingleTF)

The script downloads the historical quotes data of the current chart symbol and timeframe.

CSeries Class CSeries Class

A low latency container for working with ticks