Activity for SGSSI university course.
Note: this repository was previously known as "SGSSI-21.A.7.1.1"
This is a helper tool for cryptographic works done on the course. Some of the use cases of the tool:
- Get a hash of a text or file.
- Create a copy of a file with its hash appended.
- Search a digest with a predefined number of zeroes.
- Mine a block
During the course we are creating a blockchain with all the sha256 digests of the files we are delivering.
This tool can be used to mine a block, this searches for a 8 hexadecimal string that creates a digest with a predefined number of zeroes.
Binary packages are available on the releases page of the repository.
Note: In order to get the maximum performance binary packages should be used as they are compiled with byte code and they will perform much better than running from the source code.
To run the software or build it you need NodeJS, it is also recommended to use yarn to manage the project dependencies.
- Clone the repository onto your system
- Run
yarn
to install all the dependencies.
The project is build on TypeScript, you can run it without compiling it using
the "start" script yarn start ...
.
To compile the code use the "build" script yarn build
. You can also use the
"watch" script to hot-compile it yarn watch
.
To compile the code into binaries use the "package" script yarn package
. The
script compiles the TypeScript code into JavaScript and builds it. The binaries
are saved in the bin
directory.