I'm trying to use Hash Function. I understand that I can digest string or bytes. But, what is the input value when I use Object O for the input?
Object O has two int values, and toString() function
public Key(int arg1, int arg2) {
super();
this.a=arg1;
this.b=arg2;
}
try{
MessageDigest v1 = MessageDigest.getInstance("SHA-256");
O.update(v1);
v2_1 = BytesToHex(v1.digest());
}
question from:https://stackoverflow.com/questions/65877482/java-object-to-sha-256