Related to the question Which hashing algorithm is best for uniqueness and speed?
Is there a way to create a hash function, or find one, whose hash length depends completely on the input length, has an adjustable hash character set (Since it must be 1-to-1 function the input must comply to this character set constraint as well).
Moreover the most important part is that the hash function generates as random as possible strings. So for example it would be possible to get the following two different results.
Hash(aaaa)->blue // for character set a-z
and
Hash(aaaz)->pink // for character set a-z
More examples:
Hash(aa@12a)->dakj@4 // for character set a-z, @, 0-9
and
Hash(a2#46Ww)->@3#0Pdw // for character set a-z A-Z, !-), 0-9
Notice the character length between input and output and the character sets.
What I thought so far was a probability distribution function, there are random distribution functions but I am not sure how to get there.
a, b, c, ..., z, aa, bb, ..., zzz
might behro, z, , fas, ..., mfx
, so that in function formf(a) = hro
,f(b) = z
,f(zzz) = mfz
. It's a bijective mapping of strings. Block ciphers are commonly considered a family of permutations/bijective maps (one for each key), though with constraints that differ slightly from yours.