-
Notifications
You must be signed in to change notification settings - Fork 3
/
Test.java
35 lines (30 loc) · 1.02 KB
/
Test.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package test;
import java.io.UnsupportedEncodingException;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
import java.util.Arrays;
/**
*
* @author Jonathan
*/
public class Test {
/**
*CHanging things in the comments I'm Making ChangesSSS'
* @param args the command line arguments
* @throws java.security.NoSuchAlgorithmException
* @throws java.io.UnsupportedEncodingException
*/
public static void main(String[] args) throws NoSuchAlgorithmException, UnsupportedEncodingException {
String test = "Hello world!";
System.out.println(test);
MessageDigest digest = MessageDigest.getInstance("SHA-1");
digest.reset();
byte[] input = digest.digest(test.getBytes("UTF-8"));
System.out.println(Arrays.toString(input));
}
}