Stack Exchange network consists of 183 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
$\begingroup$SHA1 only has one parameter, the data. HMAC-SHA-1 has two parameters, key and data. Simply concatenating key and data and passing them to SHA-1 is not a good idea. SHA1(Data + Key) is much weaker than HMAC-SHA-1, since it relies on collision resistance. SHA1(Key + Data) is totally broken, due to length extensions.$\endgroup$
SHA1(Data + Key)
is much weaker than HMAC-SHA-1, since it relies on collision resistance.SHA1(Key + Data)
is totally broken, due to length extensions. $\endgroup$