Replaced cipher type default to use valid type, and fixed decrypt's bit-...

...check logic