encryptutil field cleanup
This commit is contained in:
parent
ec0a1aa5c3
commit
228eec0a79
1 changed files with 3 additions and 4 deletions
|
@ -34,6 +34,9 @@ import javax.crypto.spec.SecretKeySpec;
|
||||||
import common.log.Log;
|
import common.log.Log;
|
||||||
|
|
||||||
public class EncryptUtil {
|
public class EncryptUtil {
|
||||||
|
private static final long CRC24_INIT = 0xB704CEL;
|
||||||
|
private static final long CRC24_POLY = 0x1864CFBL;
|
||||||
|
|
||||||
public static SecretKey createSharedKey() {
|
public static SecretKey createSharedKey() {
|
||||||
try {
|
try {
|
||||||
KeyGenerator keygen = KeyGenerator.getInstance("AES");
|
KeyGenerator keygen = KeyGenerator.getInstance("AES");
|
||||||
|
@ -191,10 +194,6 @@ public class EncryptUtil {
|
||||||
return new Pair<PublicKey, String>(pubkey, tok.length == 4 ? tok[3] : null);
|
return new Pair<PublicKey, String>(pubkey, tok.length == 4 ? tok[3] : null);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static final long CRC24_INIT = 0xB704CEL;
|
|
||||||
private static final long CRC24_POLY = 0x1864CFBL;
|
|
||||||
private static final byte[] CLIENT_SALT = "ItIsSaltySalt2765666 tftffs ##89n!.le98udMeowHAsh44m;+*3m9DI9Sqn".getBytes();
|
|
||||||
|
|
||||||
private static byte[] crc24(byte[] data) {
|
private static byte[] crc24(byte[] data) {
|
||||||
long crc = CRC24_INIT;
|
long crc = CRC24_INIT;
|
||||||
for(byte bt : data) {
|
for(byte bt : data) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue