UCF-CEN-5016 / NodeBB-UCF

This is a class specific fork of the NodeBB project for CEN 5016 taught in the Spring 2024 semester at UCF.
GNU General Public License v3.0
0 stars 74 forks source link

Translating src/password.js from JS to TS #185

Closed Greesh12 closed 7 months ago

Greesh12 commented 7 months ago

Changed Import statements to work in typeScript. Added types to message, callback parameter in the forkChild function, and then return message as Serializable type from child_process. Added type to rounds and password parameters in the hash function. Cast exports into the right format before hashing within getFakeHash function. Added type definitions to password, hashm shaWrapped in the compare function. Wrote the type definition of method, and msg for the tryMethod function. Added type definitions to the parameters type, rounds, and password in hashPassword. Added type definition for msg parameter in compare function and added a Promise Type. Added type definition for msg parameter in the child process. I also added then and catch calls to tryMethod to handle errors in child process. This resolves issue #5 .