# Is it possible to work out the hash using length extension attack but with different hashes type?

For example, I have:

• Unknown: A secret variable, lets call it secret, that is unknown to me
• Known: The length of secret, (lets say 128 bytes)
• Known: The hash of secret, in hash1 (lets say hash1 is sha512, this is an important part of the question since hash1 isn't hash2)

My objective here is to get hash2(secret || data_that_I_know), but hash2 being different than hash1, (lets say hash2 is sha1).

With my current understanding of the length extension attack I believe I can obtain the digest of hash1(secret || data_that_I_know), but, is it possible to get the digest from another hash type (like sha256, md5 etc.)?