Password to key
The password is stretched into the AES-256 key by a password-based key-derivation function, which mixes the password with a random salt and repeats hashing so that guessing attempts stay expensive. The salt is stored alongside the ciphertext so the identical derivation can be repeated at decryption time. Because the salt is chosen fresh for every run, the same password and plaintext never produce the same ciphertext twice.