| //+------------------------------------------------------------------+
|
| //| TestString.mq5 |
|
| //| Copyright 2026, MetaQuotes Ltd. |
|
| //| https://www.mql5.com |
|
| //+------------------------------------------------------------------+
|
| #property copyright "Copyright 2026, MetaQuotes Ltd."
|
| #property link "https://www.mql5.com"
|
| #property version "1.00"
|
| #property strict
|
|
|
| //+------------------------------------------------------------------+
|
| //| |
|
| //+------------------------------------------------------------------+
|
| #include "Encrypt.mqh"
|
|
|
| //+------------------------------------------------------------------+
|
| //| Script program start function |
|
| //+------------------------------------------------------------------+
|
| void OnStart()
|
| {
|
| //---
|
| CEncryptor encryptor;
|
| CRandomSimple random;
|
| encryptor.SetAleatoryKey(CRYPT_AES256, RandomSimpleGenerateRandomUchar, &random);
|
| Print("Key=", encryptor.Key());
|
| string out = "";
|
| encryptor.EncryptText("algo importante", CRYPT_AES256, out);
|
| Print("Texto encriptdo=", out);
|
| encryptor.DecryptText(out, CRYPT_AES256, out);
|
| Print("Texto desencriptado=", out);
|
| }
|
| //+------------------------------------------------------------------+
|