diff options
author | Mike Buland <eichlan@xagasoft.com> | 2012-11-05 22:41:51 +0000 |
---|---|---|
committer | Mike Buland <eichlan@xagasoft.com> | 2012-11-05 22:41:51 +0000 |
commit | ec05778d5718a7912e506764d443a78d6a6179e3 (patch) | |
tree | 78a9a01532180030c095acefc45763f07c14edb8 /src/stable/cryptohash.cpp | |
parent | b20414ac1fe80a71a90601f4cd1767fa7014a9ba (diff) | |
download | libbu++-ec05778d5718a7912e506764d443a78d6a6179e3.tar.gz libbu++-ec05778d5718a7912e506764d443a78d6a6179e3.tar.bz2 libbu++-ec05778d5718a7912e506764d443a78d6a6179e3.tar.xz libbu++-ec05778d5718a7912e506764d443a78d6a6179e3.zip |
Converted tabs to spaces with tabconv.
Diffstat (limited to 'src/stable/cryptohash.cpp')
-rw-r--r-- | src/stable/cryptohash.cpp | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/src/stable/cryptohash.cpp b/src/stable/cryptohash.cpp index dda734c..99a7d92 100644 --- a/src/stable/cryptohash.cpp +++ b/src/stable/cryptohash.cpp | |||
@@ -17,22 +17,22 @@ Bu::CryptoHash::~CryptoHash() | |||
17 | 17 | ||
18 | void Bu::CryptoHash::addData( const Bu::String &sData ) | 18 | void Bu::CryptoHash::addData( const Bu::String &sData ) |
19 | { | 19 | { |
20 | addData( sData.getStr(), sData.getSize() ); | 20 | addData( sData.getStr(), sData.getSize() ); |
21 | } | 21 | } |
22 | 22 | ||
23 | Bu::String Bu::CryptoHash::getHexResult() | 23 | Bu::String Bu::CryptoHash::getHexResult() |
24 | { | 24 | { |
25 | Bu::String sResult = getResult(); | 25 | Bu::String sResult = getResult(); |
26 | Bu::String sRet( 2*sResult.getSize() ); | 26 | Bu::String sRet( 2*sResult.getSize() ); |
27 | static const char hex_tab[] = {"0123456789abcdef"}; | 27 | static const char hex_tab[] = {"0123456789abcdef"}; |
28 | 28 | ||
29 | int k = 0; | 29 | int k = 0; |
30 | for( int i = 0; i < sResult.getSize(); i++ ) | 30 | for( int i = 0; i < sResult.getSize(); i++ ) |
31 | { | 31 | { |
32 | sRet[k++] = hex_tab[(((unsigned char)sResult[i])>>4) & 0xF]; | 32 | sRet[k++] = hex_tab[(((unsigned char)sResult[i])>>4) & 0xF]; |
33 | sRet[k++] = hex_tab[((unsigned char)sResult[i]) & 0xF]; | 33 | sRet[k++] = hex_tab[((unsigned char)sResult[i]) & 0xF]; |
34 | } | 34 | } |
35 | 35 | ||
36 | return sRet; | 36 | return sRet; |
37 | } | 37 | } |
38 | 38 | ||