fixed bug in encrypt. char overflows in cipher calculation so converted to int