From 3a26383c4d1429796e328a5d1dd3b86c02cd5d4d Mon Sep 17 00:00:00 2001 From: orignal Date: Tue, 7 Apr 2015 14:40:36 -0400 Subject: [PATCH] made Encrypt const --- ElGamal.h | 2 +- Identity.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ElGamal.h b/ElGamal.h index d7105c41..3eed1ce6 100644 --- a/ElGamal.h +++ b/ElGamal.h @@ -26,7 +26,7 @@ namespace crypto b1 = a_exp_b_mod_c (y, k, elgp); } - void Encrypt (const uint8_t * data, int len, uint8_t * encrypted, bool zeroPadding = false) + void Encrypt (const uint8_t * data, int len, uint8_t * encrypted, bool zeroPadding = false) const { // calculate b = b1*m mod p uint8_t m[255]; diff --git a/Identity.h b/Identity.h index 9fed07a1..b5109c35 100644 --- a/Identity.h +++ b/Identity.h @@ -226,7 +226,7 @@ namespace data virtual const uint8_t * GetEncryptionPublicKey () const = 0; virtual bool IsDestination () const = 0; // for garlic - i2p::crypto::ElGamalEncryption * GetElGamalEncryption () const + const i2p::crypto::ElGamalEncryption * GetElGamalEncryption () const { if (!m_ElGamalEncryption) m_ElGamalEncryption = new i2p::crypto::ElGamalEncryption (GetEncryptionPublicKey ());