One-time-pad encryption with R and basic JavaScript