This is a simple implementation of a blockchain in Java. It allows you to create and manage a blockchain, add blocks with data, and display the contents of blocks.
This Java program demonstrates the basic concepts of a blockchain:
- Creation of blocks containing data.
- Hashing of block data using SHA-512 algorithm.
- Linking blocks together using previous hash references.
- Displaying block contents and details.
- Clone this repository to your local machine using:
git clone https://github.com/your-username/java-blockchain.git
Open the project in your preferred Java IDE or compile and run the program using the command line.
Run the program. Choose options from the menu: 1: Add a block to the blockchain with user input data. 2: Print the contents of the most recent block. 3: Print the contents of the entire blockchain. 4: Exit the program.
Java: Programming language used for the implementation. SHA-512: Hashing algorithm used to secure block data. LocalDateTime and DateTimeFormatter: Java classes for managing timestamps.
Contributions are welcome! If you find any issues or have suggestions for improvements, please open an issue or a pull request in this repository.
This project is licensed under the MIT License.