It's all wrong. The "fact" that a key is somehow related to some strings is nothing but your fantasy. If you generated a key from a string, it's your problem. All cryptographic keys are just arrays of bytes. (Please see
Aes Class (System.Security.Cryptography)[
^].) Also, you should understand that those keys have nothing to do with the concept of "password".
And, just in case: if you think that a password (I'm talking about real passwords now) can be encrypted and stored, think again: the idea would be totally unsafe. Passwords should never be stored anywhere or transmitted via the network for authentication. If you feel confused or disagree, read about cryptographic has functions and their use for password-based authentication.I have no idea what is your purpose, and this is bad. This is the fist thing you had to explain. The whole idea of symmetric encryption is questionable for most applications. You need to understand some basic cryptographic ideas first. Please see:
Symmetric-key algorithm — Wikipedia, the free encyclopedia[
^],
Public-key cryptography — Wikipedia, the free encyclopedia[
^],
Cryptography — Wikipedia, the free encyclopedia[
^].
—SA