CSHA256
The CSHA256 Module for the addon API!
READ THIS IF YOU’RE WONDERING ABOUT THE DIFFERENCE BETWEEN THE
SHA256 MODULE AND CSHA256.CSHA256 functions the same as SHA256; however, it uses a different prime number, resulting in a completely different hash output from standard SHA256. This means that existing hash databases will not work with CSHA256 unless you create a dedicated database for it.
The Computer uses this in order to prevent you from using a already-existing hash database at the time of writing this (26 November, 2025)
In the near future, we may deprecate this module and update the SHA256 library to allow custom prime numbers and salting. Due to time constraints, we were unable to implement this initially.
Functions
encode
sm.scrapcomputers.csha256.encode( str )
Encodes a string to be CSHA256.
Arguments:
- str [ string ] The string to convert to CSHA256.
Returns:
- [ string ] The hashed string.
random
sm.scrapcomputers.csha256.random()
Returns a random CSHA256
Returns:
- [ string ] The randomly generated CSHA256