aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--rsa.cpp4
1 files 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)));