JavaScript version of the Pyramidal Encryption Standard