Parameterise key-length

Made it possible to supply a key length in case you want to store a longer password.