forked from Lumina-CC/EmbeddedComputerMod
-
Notifications
You must be signed in to change notification settings - Fork 1
API reference
average warrior cats fan edited this page Mar 25, 2025
·
3 revisions
embedded.setPassword(string pass) - old, aliases to security.lock. prior to 1.1.0 / 0.4.0 it was equivalent to security.lockInsecure
security.lock(string pass) - alias of security.lockHashed that uses SHA256. adds a lock to the computer, uses SHA256 hashed many times then finally hashed with SHA512 several times. do NOT manually write to .LOCKED_HASHED if you want your stuff to work.
security.lockHashed(string pass, string algo) - like security.lock but you specify the algorithm. supports the following:
- sha256 (recommended)
- murmur3
- adler32
- siphash24
security hash functions are listed below:
security.hashStrSHA512(string)security.hashStrSHA256(string)security.hashStrMurmur3(string)security.hashStrAdler32(string)security.hashStrSipHash24(string)
Peripheral functions:
embeddedComputer.isOn()embeddedComputer.getId()embeddedComputer.reboot()-
embeddedComputer.format()- requires the computer to be unlocked to use. both the secure and insecure locks need to be removed -
embeddedComputer.unlockPlainText(string password)- removes the insecure lock -
embeddedComputer.unlockHashed(string pass, string algo)- removes the hashed lock, same args assecurity.lockHashed -
embeddedComputer.unlock(string pass)- alias to unlockHashed with SHA256. prior to 1.1.0 / 0.4.0 it was equivalent toembeddedComputer.unlockPlainText -
hardDrive.mount(location)- mounts the hard drive to any location on computer -
hardDrive.unmount(location)- unmounts the hard drive from this location