CryptoByLeo/Src/RSA/Keys/Public.mqh

62 lines
2 KiB
MQL5
Raw Permalink Normal View History

2026-08-23 19:36:33 -05:00
//+------------------------------------------------------------------+
//| 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[])
{
2026-08-24 09:57:30 -05:00
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[])
{
2026-08-23 19:36:33 -05:00
}
//+------------------------------------------------------------------+
}
//---
#endif // CRYPTOBYLEO_SRC_RSA_KEYS_PUBLIC_MQH