70 lines
2.5 KiB
MQL5
70 lines
2.5 KiB
MQL5
//+------------------------------------------------------------------+
|
|
//| Private.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_PRIVATE_MQH
|
|
#define CRYPTOBYLEO_SRC_RSA_KEYS_PRIVATE_MQH
|
|
|
|
//+------------------------------------------------------------------+
|
|
//| |
|
|
//+------------------------------------------------------------------+
|
|
#include "H.mqh"
|
|
|
|
//+------------------------------------------------------------------+
|
|
//| |
|
|
//+------------------------------------------------------------------+
|
|
namespace TSN
|
|
{
|
|
//+------------------------------------------------------------------+
|
|
//| |
|
|
//+------------------------------------------------------------------+
|
|
void CRsaPrivateKey::Load(BigUInteger &n, BigUInteger &d, BigUInteger &p, BigUInteger &q, BigUInteger &dp,
|
|
BigUInteger &dq, BigUInteger &qin, const ulong e, int total_bits)
|
|
{
|
|
m_n.RobarDe(n);
|
|
m_d.RobarDe(d);
|
|
m_p.RobarDe(p);
|
|
m_q.RobarDe(q);
|
|
m_dp.RobarDe(dp);
|
|
m_dq.RobarDe(dq);
|
|
m_qinv.RobarDe(qin);
|
|
m_e = e;
|
|
m_total_sbits = total_bits;
|
|
m_total_sbytes = total_bits >> 3;
|
|
}
|
|
|
|
//+------------------------------------------------------------------+
|
|
//| |
|
|
//+------------------------------------------------------------------+
|
|
template <typename TRandomFunc>
|
|
bool CRsaPrivateKey::Decrypt(const uchar &chiper_text[], uchar &out[])
|
|
{
|
|
|
|
}
|
|
|
|
//+------------------------------------------------------------------+
|
|
//| |
|
|
//+------------------------------------------------------------------+
|
|
bool CRsaPrivateKey::Firmar(const uchar &raw[], uchar &out[])
|
|
{
|
|
|
|
|
|
}
|
|
|
|
|
|
//+------------------------------------------------------------------+
|
|
//| |
|
|
//+------------------------------------------------------------------+
|
|
|
|
|
|
//+------------------------------------------------------------------+
|
|
}
|
|
|
|
|
|
//---
|
|
#endif // CRYPTOBYLEO_SRC_RSA_KEYS_PRIVATE_MQH
|