diff options
author | Tom Smeding <hallo@tomsmeding.nl> | 2016-10-28 00:20:21 +0200 |
---|---|---|
committer | tomsmeding <tom.smeding@gmail.com> | 2016-10-28 00:22:18 +0200 |
commit | f19210d6696efe118c5bb7906cdedc61bde9ff7c (patch) | |
tree | acc3d0d3cae30cd6095edeacfb3f0f46f12dc544 | |
parent | e844beecc86dafca3e49b2ab2986c118e38ef1a4 (diff) |
Fix int type in rsa.cpp
-rw-r--r-- | rsa.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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))); |