Yes, but I guess I was curious what changes I could make to reference this as "long" expressions instead of int. Int is only 32 bit and could only do the first 2147483647 (16^8-1) without error. My...
Type: Posts; User: Djinn
Yes, but I guess I was curious what changes I could make to reference this as "long" expressions instead of int. Int is only 32 bit and could only do the first 2147483647 (16^8-1) without error. My...
Finally got it with a little bit of help from other sources.
import java.security.MessageDigest;
public class SHAHashingExample
{
public static void main(String[] args)throws Exception
{...
import java.security.MessageDigest;
public class SHAHashingExample {
public static void main(String[] args)throws Exception {
String a = "0000000000000000"; // defines Original value
...
I moved it like you said, but it still must be recognizing it as a method in a method. will use // to describe what I am trying to do.
import java.security.MessageDigest;
public class...
I'll give it a go. Taking a break for a few hours and will let you know what I get.
I'll admit I feel I am still too new to it all and I can only guess your meaning. I assume you mean I need to close off my initial for statement with a "}", then I can take the result and run it...
Always. ;)
Is my prependzero string idea (from this post) a valid one to get the result I want with the leading zeros for the Original output? And if so, since Norm says I can't use "b" as a...
The 3 lines I posted earlier was an example coding to get the leading zeros to stay with original 16 digit hex number. I was going to to use an if/else but instead saw this as an example and though...
This is the error I get when I try to compile the above.
SHAHashingExample.java:11: error: ';' expected
String prependZeros(b); { // number >= 0
^...
Working with an if/else string for that.
Edit:
nevermind, I see what you mean.
Using this but may need to rework it:
String prependZeros(int number) { // number >= 0
String s=...
ok so far I got the hex values without the leading zeros by doing this:
for (int b=Integer.parseInt(a);b<=17;b++) {
String strHexNumber = Integer.toHexString(b);...
Per first post:
Original: 0000000000000000
Hash: fcdb4b423f4e5283afa249d762ef6aef150e91fccd810d43e5 e719d14512dec7
<blank line>
Original: 0000000000000001
Hash:...
Ok, so this:
import java.security.MessageDigest;
public class SHAHashingExample
{
public static void main(String[] args)throws Exception
{
String a = "0000000000000000";
Nothing. That one is written to only give 1 output result. Per my original post, I want the consecutive output of 17 (0x0000000000000000 through 0x0000000000000010).
In looking it over, I...
Here is the original one I was working with
import java.security.MessageDigest;
public class SHAHashingExample
{
public static void main(String[] args)throws Exception
{
...
I started only a few days ago trying to figure this out under "questions". Go there for an explanation of what I am trying to do.
I've been reading a lot and I learned a little bit more about...