Changeset 71
- Timestamp:
- Sep 23, 2006, 10:37:59 PM (19 years ago)
- Location:
- qca/trunk/src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
qca/trunk/src/qca.cpp
r27 r71 456 456 // SHA256 457 457 //---------------------------------------------------------------------------- 458 458 459 SHA256::SHA256() 459 460 :Hash((QCA_HashContext *)getContext(CAP_SHA256)) 460 461 { 461 462 } 463 462 464 463 465 -
qca/trunk/src/qca.h
r27 r71 55 55 #endif 56 56 57 58 59 60 57 61 class QHostAddress; 58 62 class QStringList; … … 116 120 }; 117 121 122 118 123 template <class T> 119 124 class QCA_EXPORT HashStatic … … 146 151 } 147 152 }; 153 148 154 149 155 class QCA_EXPORT Cipher … … 187 193 }; 188 194 189 class QCA_EXPORT SHA1 : public Hash, public HashStatic<SHA1> 195 class QCA_EXPORT SHA1 : public Hash 196 #if !defined(MSC_NET_HOTFIX) 197 , public HashStatic<SHA1> 198 #endif 190 199 { 191 200 public: 192 201 SHA1(); 193 }; 194 202 203 #if defined(MSC_NET_HOTFIX) 204 static QByteArray hash(const QByteArray &a) 205 { 206 SHA1 obj; 207 obj.update(a); 208 return obj.final(); 209 } 210 211 static QByteArray hash(const QCString &cs) 212 { 213 QByteArray a(cs.length()); 214 memcpy(a.data(), cs.data(), a.size()); 215 return hash(a); 216 } 217 218 static QString hashToString(const QByteArray &a) 219 { 220 return arrayToHex(hash(a)); 221 } 222 223 static QString hashToString(const QCString &cs) 224 { 225 return arrayToHex(hash(cs)); 226 } 227 #endif 228 }; 229 230 #if !defined(MSC_NET_HOTFIX) 195 231 class QCA_EXPORT SHA256 : public Hash, public HashStatic<SHA256> 196 232 { … … 198 234 SHA256(); 199 235 }; 200 201 class QCA_EXPORT MD5 : public Hash, public HashStatic<MD5> 236 #endif 237 238 class QCA_EXPORT MD5 : public Hash 239 #if !defined(MSC_NET_HOTFIX) 240 , public HashStatic<MD5> 241 #endif 202 242 { 203 243 public: 204 244 MD5(); 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 205 271 }; 206 272
Note:
See TracChangeset
for help on using the changeset viewer.
