Update encrypt.c

fix bug