Restore random seed function for byte endpoints

os.urandom() ignores random.seed(), so I'm restoring the use of
random.randint in a python3 compatible way.