mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-04-22 01:03:01 +02:00
Cache the blobs generated by scripts
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
import { sha256 } from "js-sha256";
|
||||
|
||||
/**
|
||||
* Computes a SHA-256 hash of a string synchronously
|
||||
* @param message The input string
|
||||
* @returns The SHA-256 hash in hex
|
||||
*/
|
||||
export function computeHash(message: string): string {
|
||||
var hash = sha256.create();
|
||||
hash.update(message);
|
||||
return hash.hex();
|
||||
}
|
||||
Reference in New Issue
Block a user