Fixed the encryption generation