formatting
This commit is contained in:
@@ -83,10 +83,10 @@ public abstract class NoUser implements Serializable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
KeyPair keyPair = kpg.generateKeyPair();
|
KeyPair keyPair = kpg.generateKeyPair();
|
||||||
this.publicKey = (RSAPublicKeyImpl) keyPair.getPublic();
|
publicKey = (RSAPublicKeyImpl) keyPair.getPublic();
|
||||||
this.privateKey = (RSAPrivateCrtKeyImpl) keyPair.getPrivate();
|
privateKey = (RSAPrivateCrtKeyImpl) keyPair.getPrivate();
|
||||||
this.influences = 0;
|
influences = 0;
|
||||||
this.actions = 0;
|
actions = 0;
|
||||||
touchRandomizer();
|
touchRandomizer();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -155,9 +155,11 @@ public abstract class NoUser implements Serializable {
|
|||||||
|
|
||||||
return NoUtil.getHashFromByteArray(itemBytes);
|
return NoUtil.getHashFromByteArray(itemBytes);
|
||||||
} catch (IllegalArgumentException e) {
|
} catch (IllegalArgumentException e) {
|
||||||
throw new NoDashFatalException("IllegalArgument Exception encountered while generating user hash.", e);
|
throw new NoDashFatalException(
|
||||||
|
"IllegalArgument Exception encountered while generating user hash.", e);
|
||||||
} catch (IllegalAccessException e) {
|
} catch (IllegalAccessException e) {
|
||||||
throw new NoDashFatalException("IllegalAccess Exception encountered while generating user hash.", e);
|
throw new NoDashFatalException(
|
||||||
|
"IllegalAccess Exception encountered while generating user hash.", e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -183,12 +185,12 @@ public abstract class NoUser implements Serializable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public final void addAction(NoAction action) {
|
public final void addAction(NoAction action) {
|
||||||
this.outgoing.add(action);
|
outgoing.add(action);
|
||||||
actions++;
|
actions++;
|
||||||
}
|
}
|
||||||
|
|
||||||
public final List<NoAction> getNoActions() {
|
public final List<NoAction> getNoActions() {
|
||||||
return this.outgoing;
|
return outgoing;
|
||||||
}
|
}
|
||||||
|
|
||||||
public final BigInteger getPublicExponent() {
|
public final BigInteger getPublicExponent() {
|
||||||
@@ -213,11 +215,11 @@ public abstract class NoUser implements Serializable {
|
|||||||
|
|
||||||
private final byte[] decryptRsa(byte[] data)
|
private final byte[] decryptRsa(byte[] data)
|
||||||
throws InvalidKeyException, IllegalBlockSizeException, BadPaddingException {
|
throws InvalidKeyException, IllegalBlockSizeException, BadPaddingException {
|
||||||
return NoUtil.decryptRsa(data, this.privateKey);
|
return NoUtil.decryptRsa(data, privateKey);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static NoUser createUserFromFile(byte[] data, char[] password, Class<? extends NoUser> clazz)
|
public static NoUser createUserFromFile(byte[] data, char[] password,
|
||||||
throws NoUserNotValidException {
|
Class<? extends NoUser> clazz) throws NoUserNotValidException {
|
||||||
byte[] decrypted;
|
byte[] decrypted;
|
||||||
try {
|
try {
|
||||||
decrypted = NoUtil.decrypt(data, password);
|
decrypted = NoUtil.decrypt(data, password);
|
||||||
|
|||||||
Reference in New Issue
Block a user