Fix decrypt function
Finish input function