fingerprintlib/src/main/java/com/lib/lock/fingerprint/core/CryptoObjectCreator.java
/**
     * Initialize the {@link Cipher} instance with the created key in the {@link #createKey()}
     * method.
     *
     * @return {@code true} if initialization is successful, {@code false} if the lock screen has
     * been disabled or reset after the key was generated, or if a fingerprint got enrolled after
     * the key was generated.
     */
Initialize the  Cipher instance with the created key in the  #createKey()
method.

@return  true if initialization is successful,  false if the lock screen has
been disabled or reset after the key was generated, or if a fingerprint got enrolled after
the key was generated.
Initialize the Cipher instance with the created key in the #createKey () method . @return true if initialization is successful false if the lock screen has been disabled or reset after the key was generated or if a fingerprint got enrolled after the key was generated .
private boolean initCipher() {
        try {
            mKeyStore.load(null);
            SecretKey key = (SecretKey) mKeyStore.getKey(KEY_NAME, null);
            mCipher.init(Cipher.ENCRYPT_MODE, key);
            return true;
        } catch (KeyPermanentlyInvalidatedException e) {
             Log.e(""," Failed to initCipher, e:"  );
            return false;
        } catch (KeyStoreException | CertificateException | UnrecoverableKeyException | IOException
                | NoSuchAlgorithmException | InvalidKeyException e) {
             Log.e(""," Failed to initCipher, e :"  );
            throw new RuntimeException("Failed to init Cipher", e);
        }
    }
private boolean initCipher ( ) { try { mKeyStore . load ( null ) ; SecretKey key = ( SecretKey ) mKeyStore . getKey ( KEY_NAME , null ) ; mCipher . init ( Cipher . ENCRYPT_MODE , key ) ; return true ; } catch ( KeyPermanentlyInvalidatedException e ) { Log . e ( "" , " Failed to initCipher, e:" ) ; return false ; } catch ( KeyStoreException | CertificateException | UnrecoverableKeyException | IOException | NoSuchAlgorithmException | InvalidKeyException e ) { Log . e ( "" , " Failed to initCipher, e :" ) ; throw new RuntimeException ( "Failed to init Cipher" , e ) ; } }
Initialize the {@link Cipher} instance with the created key in the {@link #createKey()}
 method.
Initialize the { @link Cipher } instance with the created key in the { @link #createKey () } method .