Based on the ephemiat answer , I think you can do something like this:
(: AES). , 128- . K Enc (K, block) Dec (K, block) , block = Dec (K, Enc (K, block)) = Enc (K, Dec (K, )).
128- ( ). K . , .
def hash(input):
state = arbitrary 128-bit initialization vector
for i = 1 to len(input) do
state = state ^ Enc(K, input[i])
return concatenate(state, Dec(K, state))
256- . , "" - 128- . , (input) = hash (input + hash (input)), , hash (input) = hash (input '+ hash (input)), input' . , .