ECKey: fix test and avoid randomBuffer interface lock