Rename to Impl since no other ciphers left
This commit is contained in:
parent
3fef796546
commit
18d7c9c218
@ -52,7 +52,7 @@ public class BiometricAuthCryptor {
|
||||
}
|
||||
|
||||
public String decrypt(javax.crypto.Cipher cipher, String password) throws IllegalBlockSizeException, BadPaddingException {
|
||||
byte[] ciphered = cipher.doFinal(CipherFromApi23.getBytes(password.getBytes(ISO_8859_1)));
|
||||
byte[] ciphered = cipher.doFinal(CipherImpl.getBytes(password.getBytes(ISO_8859_1)));
|
||||
return new String(ciphered, UTF_8);
|
||||
}
|
||||
}
|
||||
|
@ -8,14 +8,14 @@ import javax.crypto.spec.IvParameterSpec;
|
||||
|
||||
import static java.lang.System.arraycopy;
|
||||
|
||||
class CipherFromApi23 implements Cipher {
|
||||
class CipherImpl implements Cipher {
|
||||
|
||||
private static final int IV_LENGTH = 16;
|
||||
|
||||
private final javax.crypto.Cipher cipher;
|
||||
private final SecretKey key;
|
||||
|
||||
CipherFromApi23(javax.crypto.Cipher cipher, SecretKey key) {
|
||||
CipherImpl(javax.crypto.Cipher cipher, SecretKey key) {
|
||||
this.cipher = cipher;
|
||||
this.key = key;
|
||||
}
|
@ -16,7 +16,7 @@ class CryptoOperationsFactory {
|
||||
}
|
||||
|
||||
private static CryptoOperations createCryptoOperations() {
|
||||
return new CryptoOperationsFromApi23();
|
||||
return new CryptoOperationsImpl();
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -10,7 +10,7 @@ import java.security.UnrecoverableKeyException;
|
||||
|
||||
import javax.crypto.SecretKey;
|
||||
|
||||
class CryptoOperationsFromApi23 implements CryptoOperations {
|
||||
class CryptoOperationsImpl implements CryptoOperations {
|
||||
|
||||
@Override
|
||||
public Cipher cryptor(KeyStore keyStore, String alias) throws UnrecoverableStorageKeyException {
|
||||
@ -19,7 +19,7 @@ class CryptoOperationsFromApi23 implements CryptoOperations {
|
||||
final javax.crypto.Cipher cipher = javax.crypto.Cipher.getInstance(KeyProperties.KEY_ALGORITHM_AES + "/" //
|
||||
+ KeyProperties.BLOCK_MODE_CBC + "/" //
|
||||
+ KeyProperties.ENCRYPTION_PADDING_PKCS7);
|
||||
return new CipherFromApi23(cipher, key);
|
||||
return new CipherImpl(cipher, key);
|
||||
} catch (UnrecoverableKeyException e) {
|
||||
throw new UnrecoverableStorageKeyException(e);
|
||||
} catch (Exception e) {
|
Loading…
x
Reference in New Issue
Block a user