python implemention of a one-time-pad algorithm