2

Unfortunately, I need to generate some SHA-0 hashes, I was using BouncyCastle and there's nothing in there to generating them.

I know it's weak and not secure, but regardless, I have to be able to use it.

I'm trying to avoid writing a method that does SHA-0 from scratch, and even that algorithm is hard to find on Google, since every SHA-0 article is about the collisions and weaknesses.

Does anyone know any tools I can use which still supports the SHA-0 method?

Vilican
  • 2,792
  • 8
  • 23
  • 35
g3trans
  • 75
  • 5

1 Answers1

4

SHA-0 is supported in sphlib; that library contains implementations of SHA-0 in both C and Java. The C code also comes with an appropriate command-line tool.

Repurposing a SHA-1 implementation into a SHA-0 implementation is not hard; the two functions differ only by an additional rotation in the "word expansion" step.

Thomas Pornin
  • 326,555
  • 60
  • 792
  • 962