hash key automatically when encrypting