fix encryption algorithm