aboutsummaryrefslogtreecommitdiff
path: root/rsa.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'rsa.cpp')
-rw-r--r--rsa.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/rsa.cpp b/rsa.cpp
index 77e1350..e1bf3a8 100644
--- a/rsa.cpp
+++ b/rsa.cpp
@@ -51,8 +51,8 @@ namespace RSA{
PrivateKey importkey(const string &pub,const string &priv){
string pubdeser=Base64::decode(pub);
assert(pubdeser.size()>4);
- int modlen=(unsigned char)(pubdeser[0])+(unsigned char)(pubdeser[1]<<8)+
- (unsigned char)(pubdeser[2]<<16)+(unsigned char)(pubdeser[3]<<24);
+ int modlen=(uint8_t)pubdeser[0]+((uint8_t)pubdeser[1]<<8)+
+ ((uint8_t)pubdeser[2]<<16)+((uint8_t)pubdeser[3]<<24);
assert((int)pubdeser.size()-4>modlen);
PrivateKey key;
key.pub.mod.deserialiseMantissa(string(pubdeser.begin()+4,pubdeser.begin()+(4+modlen)));