Skip to content
This repository has been archived by the owner on Aug 6, 2021. It is now read-only.
/ uop-hash Public archive

Native UOP hashing function for Node.js.

Notifications You must be signed in to change notification settings

uojs/uop-hash

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

uop-hash

Calculates the hash used by UOP files.

Since just 53-bits is the maximum supported precision by javascript with integers, this function returns an array of 32-bit unsigned integers.

Installation

npm install uop-hash or yarn add uop-hash

Example

var hash = require('uop-hash');

var myHashedFilename = hash('beepboop'); // returns an uint32_t[2] (Number[2])

Notes

The code listed in this was adapted from ServUO's UltimaSDK source in FileIndex.cs:HashFileName function