summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2012-02-10 20:05:39 -1000
committerJohn Wiegley <johnw@newartisans.com>2012-02-17 15:09:31 -0600
commitcebb0698e83059015cc7ef93f6871e10f938e808 (patch)
tree60c7aa0b052bc916c29851be89d4587b11686445
parent95717c9494d804022592d59dc27ddf2139d062be (diff)
downloadfork-ledger-cebb0698e83059015cc7ef93f6871e10f938e808.tar.gz
fork-ledger-cebb0698e83059015cc7ef93f6871e10f938e808.tar.bz2
fork-ledger-cebb0698e83059015cc7ef93f6871e10f938e808.zip
Corrected a cast in sha1.cpp
-rw-r--r--lib/sha1.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/lib/sha1.cpp b/lib/sha1.cpp
index 5610cd44..1048b157 100644
--- a/lib/sha1.cpp
+++ b/lib/sha1.cpp
@@ -552,14 +552,14 @@ void SHA1::PadMessage()
/*
* Store the message length as the last 8 octets
*/
- Message_Block[56] = static_cast<char>((Length_High >> 24) & 0xFF);
- Message_Block[57] = static_cast<char>((Length_High >> 16) & 0xFF);
- Message_Block[58] = static_cast<char>((Length_High >> 8) & 0xFF);
- Message_Block[59] = static_cast<char>((Length_High) & 0xFF);
- Message_Block[60] = static_cast<char>((Length_Low >> 24) & 0xFF);
- Message_Block[61] = static_cast<char>((Length_Low >> 16) & 0xFF);
- Message_Block[62] = static_cast<char>((Length_Low >> 8) & 0xFF);
- Message_Block[63] = static_cast<char>((Length_Low) & 0xFF);
+ Message_Block[56] = static_cast<unsigned char>((Length_High >> 24) & 0xFF);
+ Message_Block[57] = static_cast<unsigned char>((Length_High >> 16) & 0xFF);
+ Message_Block[58] = static_cast<unsigned char>((Length_High >> 8) & 0xFF);
+ Message_Block[59] = static_cast<unsigned char>((Length_High) & 0xFF);
+ Message_Block[60] = static_cast<unsigned char>((Length_Low >> 24) & 0xFF);
+ Message_Block[61] = static_cast<unsigned char>((Length_Low >> 16) & 0xFF);
+ Message_Block[62] = static_cast<unsigned char>((Length_Low >> 8) & 0xFF);
+ Message_Block[63] = static_cast<unsigned char>((Length_Low) & 0xFF);
ProcessMessageBlock();
}