renaming to adhere to GoogleStyle conventions

This commit is contained in:
Dave
2015-06-28 21:50:46 +02:00
parent 6ff5e60046
commit a40d5e9738
6 changed files with 27 additions and 27 deletions

View File

@@ -77,7 +77,7 @@ public final class NoUtil {
}
}
private static byte[] getPBEKeyFromPassword(char[] password) {
private static byte[] getPbeKeyFromPassword(char[] password) {
SecretKeyFactory skf;
try {
skf = SecretKeyFactory.getInstance(NoUtil.PBE_TYPE);
@@ -106,14 +106,14 @@ public final class NoUtil {
public static byte[] decrypt(byte[] data, char[] password) throws IllegalBlockSizeException,
BadPaddingException {
byte[] passwordByte = NoUtil.getPBEKeyFromPassword(password);
byte[] passwordByte = NoUtil.getPbeKeyFromPassword(password);
byte[] response = NoUtil.decrypt(NoUtil.decrypt(data), passwordByte);
NoUtil.wipeBytes(passwordByte);
return response;
}
public static byte[] encrypt(byte[] data, char[] password) {
byte[] passwordByte = NoUtil.getPBEKeyFromPassword(password);
byte[] passwordByte = NoUtil.getPbeKeyFromPassword(password);
byte[] response = NoUtil.encrypt(NoUtil.encrypt(data, passwordByte));
NoUtil.wipeBytes(passwordByte);
return response;
@@ -172,7 +172,7 @@ public final class NoUtil {
return NoUtil.decrypt(data, NoCore.config.getSecretKey().getEncoded());
}
public static byte[] encryptRSA(byte[] data, PublicKey publicKey) {
public static byte[] encryptRsa(byte[] data, PublicKey publicKey) {
Cipher cipher;
try {
cipher = Cipher.getInstance(NoUtil.CIPHER_RSA_TYPE);
@@ -194,7 +194,7 @@ public final class NoUtil {
}
}
public static byte[] decryptRSA(byte[] data, PrivateKey privateKey) throws InvalidKeyException,
public static byte[] decryptRsa(byte[] data, PrivateKey privateKey) throws InvalidKeyException,
IllegalBlockSizeException, BadPaddingException {
Cipher cipher;
try {

View File

@@ -54,7 +54,7 @@ public final class NoSessionSphere {
public static void shred(byte[] encryptedUUID) {
try {
UUID uuid = NoSession.decryptUUID(encryptedUUID);
UUID uuid = NoSession.decryptUuid(encryptedUUID);
if (NoSessionSphere.sessions.containsKey(uuid)) {
NoSession session = NoSessionSphere.sessions.get(uuid);
NoByteSetSphere.addList(session.incoming, session.current.getRSAPublicKey());
@@ -116,12 +116,12 @@ public final class NoSessionSphere {
/* Will set to 2.1[MODIFIED] or 2.2[IDLE] */
/* Precursor to 3.; allow website to associate user session with a cookie. */
return session.getEncryptedUUID();
return session.getEncryptedUuid();
}
public static NoUser getUser(byte[] encryptedUUID) throws NoDashSessionBadUUIDException,
NoSessionExpiredException, NoSessionConfirmedException {
UUID uuid = NoSession.decryptUUID(encryptedUUID);
UUID uuid = NoSession.decryptUuid(encryptedUUID);
if (NoSessionSphere.sessions.containsKey(uuid)) {
NoSessionSphere.pruneSingle(uuid);
try {
@@ -135,7 +135,7 @@ public final class NoSessionSphere {
public static NoState getState(byte[] encryptedUUID) throws NoDashSessionBadUUIDException,
NoSessionExpiredException, NoSessionConfirmedException {
UUID uuid = NoSession.decryptUUID(encryptedUUID);
UUID uuid = NoSession.decryptUuid(encryptedUUID);
if (NoSessionSphere.sessions.containsKey(uuid)) {
NoSessionSphere.pruneSingle(uuid);
NoSession session = NoSessionSphere.sessions.get(uuid);
@@ -147,7 +147,7 @@ public final class NoSessionSphere {
public static synchronized byte[] save(byte[] encryptedUUID, char[] password)
throws NoDashSessionBadUUIDException, NoSessionExpiredException, NoSessionConfirmedException,
NoSessionNotChangedException, NoSessionAlreadyAwaitingConfirmationException {
UUID uuid = NoSession.decryptUUID(encryptedUUID);
UUID uuid = NoSession.decryptUuid(encryptedUUID);
if (NoSessionSphere.sessions.containsKey(uuid)) {
NoSessionSphere.pruneSingle(uuid);
NoSession session = NoSessionSphere.sessions.get(uuid);
@@ -165,7 +165,7 @@ public final class NoSessionSphere {
public static synchronized void confirm(byte[] encryptedUUID, char[] password, byte[] data)
throws NoDashSessionBadUUIDException, NoSessionExpiredException, NoSessionConfirmedException,
NoSessionNotAwaitingConfirmationException, NoUserNotValidException {
UUID uuid = NoSession.decryptUUID(encryptedUUID);
UUID uuid = NoSession.decryptUuid(encryptedUUID);
if (NoSessionSphere.sessions.containsKey(uuid)) {
NoSessionSphere.pruneSingle(uuid);
NoSession session = NoSessionSphere.sessions.get(uuid);
@@ -179,7 +179,7 @@ public final class NoSessionSphere {
NoSession session = new NoSession(user);
NoSessionSphere.sessions.put(session.uuid, session);
try {
byte[] cookie = session.getEncryptedUUID();
byte[] cookie = session.getEncryptedUuid();
return new NoRegister(cookie, NoSessionSphere.save(cookie, password));
} catch (NoDashSessionBadUUIDException e) {
throw new NoDashFatalException("Immediately generated cookie throwing bad cookie error.", e);