From f19210d6696efe118c5bb7906cdedc61bde9ff7c Mon Sep 17 00:00:00 2001 From: Tom Smeding Date: Fri, 28 Oct 2016 00:20:21 +0200 Subject: Fix int type in rsa.cpp --- rsa.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rsa.cpp b/rsa.cpp index 21d252f..ba75e42 100644 --- a/rsa.cpp +++ b/rsa.cpp @@ -50,8 +50,8 @@ namespace RSA{ Key importKey(const string &repr){ string deser=Base64::decode(repr); if(deser.size()<=4)throw invalid_argument("Invalid key string length"); - int modlen=((uint8_t)deser[0]<<24)+((uint8_t)deser[1]<<16)+ - ((uint8_t)deser[2]<<8)+(uint8_t)deser[3]; + int32_t modlen=((uint8_t)deser[0]<<24)+((uint8_t)deser[1]<<16)+ + ((uint8_t)deser[2]<<8)+(uint8_t)deser[3]; if((int)deser.size()-4-modlen<=0)throw invalid_argument("Key string incomplete"); Key key; key.mod.deserialiseMantissa(string(deser.begin()+4,deser.begin()+(4+modlen))); -- cgit v1.2.3-70-g09d2