This would be difficult to translate, because AFAIK there is no builtin BigInteger-Type in Delphi. Also I don' t know if there are any RNG-implementations without external libraries.
Is RNG a random number generator?
If yes, why isn't the built in random suitable? Because of the big number range?