简体   繁体   中英

what is the difference between these salting methods

  // Salt
    byte[] salt = {
    (byte)0xc7, (byte)0x73, (byte)0x21, (byte)0x8c,
    (byte)0x7e, (byte)0xc8, (byte)0xee, (byte)0x99
    };

and

// salt
byte salt[] = {
    -87, -101, -56, 50, 86, 53, -29, 3
};

how can I convert the first piece of code tp look like the second. My java is very liitle

There is no difference.

You are only initialize the instance salt, which type is array of bytes. Java does not have memory of "how I got these numbers in the array" (it does not need one).

After initialization, you have in both cases a variable salt with some numbers in its array. No more, no less.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM