Advertisement
irapilguy

Untitled

Dec 13th, 2021
916
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.   public hashToken(token: string): number {
  2.     let hash = 0;
  3.     for (let i = 0; i < token.length; i++) {
  4.       hash = ((hash + token.charCodeAt(i)) * this.base) % this.mod;
  5.     }
  6.     return hash;
  7.   }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement