title: What happens when the encryption algorithm receives an unsupported key size?
body: <p>I try to build an encryption program, and I use AES (256/192/128) from <a href="https://github.com/SergeyBel/AES" rel="nofollow noreferrer">realisation</a> I took from GitHub there is an exception if the key is not of these sizes. But I want to use the key as a password, in <a href="https://keepass.com" rel="nofollow noreferrer">KeePass</a> (they also encrypt with this algorithm) we can create passwords of different sizes. What should I do? I must add some padding bytes? Or I must use a hash algorithm to create passwords of the same size?</p>