Is behavior of SHA-1 algorithm defined for Unicode strings? I do realize that SHA-1 itself does not care about the content of the string, however,
it seems to me that in order to pass standard tests for SHA-1, the input string should be encoded with UTF-8.
SHA-1 is based on bytes; it doesn't care about the structure of the data. If you give it a bunch of bytes that consists of Unicode strings, you'll get a result. Keep in mind that the block size is 512 bits, so smaller amounts of data may cause security issues.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With