0

Let x be a variable over which we intend to use the hash function.

I want to know if SHA256(SHA1(x)) is equal to SHA1(SHA256(x))?

mitbos
  • 27
  • 4

1 Answers1

1

I used this tool: http://www.sha1-online.com/ and found out this wont be associative.

Example

SHA256(SHA1("156")) = e8fed31bea496eb025ac3b1c09e69da975cfd1faf446fbef26cbfa265f5285e7
SHA1(SHA256("156")) = b2e10b1aec52c913d4f77060af3232105fc6d115

Even the hash function length differs, so there is no question of equality.

mitbos
  • 27
  • 4