Add hashcalc tool

This commit is contained in:
Christian Rendina 2024-12-17 18:54:28 +01:00
parent 03ca0c2cf2
commit c1f70b1eb0
3 changed files with 52 additions and 0 deletions

26
hashcalc/pom.xml Normal file
View File

@ -0,0 +1,26 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<name>MineFork GUI Hash calculator</name>
<artifactId>hashcalc</artifactId>
<version>${project.parent.version}</version>
<parent>
<artifactId>guitools</artifactId>
<version>0.1-SNAPSHOT</version>
<groupId>org.scaminc.minefork.guitools</groupId>
</parent>
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.13.0</version>
</plugin>
</plugins>
</pluginManagement>
</build>
</project>

View File

@ -0,0 +1,25 @@
package org.scaminc.minefork.guitools.hashcalc;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class HashCalc {
public static void main(String[] args)
{
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
while (true)
{
System.out.print("Type the string to hash (press ENTER to exit): ");
try {
String s = br.readLine();
if (s.isEmpty())
break;
System.out.println("Hashcode: " + s.hashCode());
} catch (IOException ignored) {
}
}
}
}

View File

@ -17,6 +17,7 @@
<modules>
<module>guicore</module>
<module>guibaker</module>
<module>hashcalc</module>
<!--<module>guieditor</module>-->
</modules>
</project>