forked from nique_372/CryptoByLeo
62 lines
2 KiB
MQL5
62 lines
2 KiB
MQL5
//+------------------------------------------------------------------+
|
|
//| Public.mqh |
|
|
//| Copyright 2026, Niquel Mendoza |
|
|
//| https://www.mql5.com |
|
|
//+------------------------------------------------------------------+
|
|
#property copyright "Copyright 2026, Niquel Mendoza"
|
|
#property link "https://www.mql5.com"
|
|
#property strict
|
|
|
|
|
|
#ifndef CRYPTOBYLEO_SRC_RSA_KEYS_PUBLIC_MQH
|
|
#define CRYPTOBYLEO_SRC_RSA_KEYS_PUBLIC_MQH
|
|
|
|
//+------------------------------------------------------------------+
|
|
//| |
|
|
//+------------------------------------------------------------------+
|
|
#include "H.mqh"
|
|
|
|
//+------------------------------------------------------------------+
|
|
//| |
|
|
//+------------------------------------------------------------------+
|
|
namespace TSN
|
|
{
|
|
//+------------------------------------------------------------------+
|
|
//| |
|
|
//+------------------------------------------------------------------+
|
|
bool CRsaPublicKey::Verify(const uchar &firma[], const uchar &data[])
|
|
{
|
|
switch(m_sing_padder)
|
|
{
|
|
case RSA_SING_PADDER_PSS:
|
|
{
|
|
// m_sing_fhash uso del hash base para este firmado (se usa en pss y en mgf1 dos en uno)
|
|
return CPSS::Verify(data, firma, m_n_bits - 1, m_sing_fhash, m_sing_data.salt_len);
|
|
}
|
|
case RSA_SING_PADDER_PKCS1V15:
|
|
{
|
|
|
|
return;
|
|
}
|
|
default:
|
|
break;
|
|
}
|
|
}
|
|
|
|
|
|
//+------------------------------------------------------------------+
|
|
//| |
|
|
//+------------------------------------------------------------------+
|
|
bool CRsaPublicKey::Cifrar(const uchar &raw[], uchar &out[])
|
|
{
|
|
|
|
|
|
|
|
}
|
|
|
|
//+------------------------------------------------------------------+
|
|
}
|
|
|
|
|
|
//---
|
|
#endif // CRYPTOBYLEO_SRC_RSA_KEYS_PUBLIC_MQH
|