Given a seed string S, I want to deterministically generate a password of the form:
N characters, each chosen from a set of characters C
Unfortunately neither N nor the cardinality of C necessarily play nicely with powers of 2, and I want to avoid introducing a bias towards any particular characters in C.
Is the following a sane approach to generating these passwords with a uniform distribution, or, is there already a well known approach to doing this?
To choose the i_th character of the password, I would compute for every character c in C the value sha256(S + i + c), then choose the character c for which this has the largest hash.