encryption works better now after creating a new random number every time the client fails to encrypt properly