encrypt with random mode