Fix bug of encrypting when set miniLength hash