// By Jack Lloyd #ifndef BOTAN_EXT_SHA_160_ASM_H__ #define BOTAN_EXT_SHA_160_ASM_H__ #include struct SHA_CTX { Botan::u32bit h0,h1,h2,h3,h4; Botan::u32bit Nl,Nh; Botan::u32bit data[16]; unsigned int num; }; namespace Botan { /************************************************* * SHA-160 * *************************************************/ class SHA_160 : public MDx_HashFunction { public: void clear() throw(); std::string name() const { return "SHA-160"; } HashFunction* clone() const { return new SHA_160; } SHA_160() : MDx_HashFunction(20, 64, true, true) { clear(); } private: void hash(const byte[]); void copy_out(byte[]); SHA_CTX ctx; }; } #endif