Hash, do not encrypt
Encryption is reversible with a key, so it is wrong for passwords. A hash is one-way and you verify by rehashing. The point of hashing is that the stored form is useless to a thief, so choose a hash you cannot run backwards.
Use a slow hash
A fast hash (MD5, SHA-1) can be guessed by trying billions of passwords a second. bcrypt, scrypt, and Argon2 are deliberately slow and salted, so a stolen database stays expensive to crack. Speed here is a feature, not a cost.