private byte[] decrypt(byte[] in) throws GeneralSecurityException { return doCipherOp(decryptor, in, false); }
private byte[] encrypt(byte[] in) throws GeneralSecurityException { return doCipherOp(encryptor, in, false); }
private byte[] encrypt(byte[] in) throws GeneralSecurityException { return doCipherOp(encryptor, in, false); }
private byte[] decrypt(byte[] in) throws GeneralSecurityException { return doCipherOp(decryptor, in, false); }
private byte[] encrypt(byte[] in) throws GeneralSecurityException { return doCipherOp(encryptor, in, false); }
private byte[] decrypt(byte[] in) throws GeneralSecurityException { return doCipherOp(decryptor, in, false); }
@Override public void close() throws IOException { // Close ciphers (by calling "doFinal()" with dummy data) and the random instance so that // internal state is cleaned up. Error handling here is just for paranoia, and not meant to // accurately report the errors when they happen. RuntimeException error = null; byte[] dummy = new byte[8]; try { doCipherOp(encryptor, dummy, true); } catch (Exception e) { error = new RuntimeException(e); } try { doCipherOp(decryptor, dummy, true); } catch (Exception e) { error = new RuntimeException(e); } random.close(); if (error != null) { throw error; } }
@Override public void close() throws IOException { // Close ciphers (by calling "doFinal()" with dummy data) and the random instance so that // internal state is cleaned up. Error handling here is just for paranoia, and not meant to // accurately report the errors when they happen. RuntimeException error = null; byte[] dummy = new byte[8]; try { doCipherOp(encryptor, dummy, true); } catch (Exception e) { error = new RuntimeException(e); } try { doCipherOp(decryptor, dummy, true); } catch (Exception e) { error = new RuntimeException(e); } random.close(); if (error != null) { throw error; } }
@Override public void close() throws IOException { // Close ciphers (by calling "doFinal()" with dummy data) and the random instance so that // internal state is cleaned up. Error handling here is just for paranoia, and not meant to // accurately report the errors when they happen. RuntimeException error = null; byte[] dummy = new byte[8]; try { doCipherOp(encryptor, dummy, true); } catch (Exception e) { error = new RuntimeException(e); } try { doCipherOp(decryptor, dummy, true); } catch (Exception e) { error = new RuntimeException(e); } random.close(); if (error != null) { throw error; } }