laFunctions = [Skein, scrypt_pbkdf2_salsa, scrypt_keccak_chacha, Groestl, Keccak, SHA512, Blake]
liFuncIndex = 3
lsHash = Data
lI = 0
while lI < 5:
if liFuncIndex < 0 or liFuncIndex > len(laFunctions):
liFuncIndex = 3
lsHash = laFunctions [liFuncIndex](lsHash)
if (lsHash[64]&(1<<0))!=0:
liFuncIndex = liFuncIndex - 1
else:
liFuncIndex = liFuncIndex + 1
lI = lI + 1
return lsHash
But it's potentially vulnerable to lsHash[64]&(1<<0) brute-forcing. This could be resolved by adding more conditions to make it stronger.