Add hashcalc tool
This commit is contained in:
parent
03ca0c2cf2
commit
c1f70b1eb0
26
hashcalc/pom.xml
Normal file
26
hashcalc/pom.xml
Normal 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>
|
@ -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) {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user