throw new RuntimeException(Messages.MESSAGES.invalidHMACkey(e.getLocalizedMessage()), e);
} catch (InvalidKeyException e) { throw new RuntimeException(e.getLocalizedMessage());
} catch (InvalidKeyException e) { throw new RuntimeException(e.getLocalizedMessage());
throw new RuntimeException(Messages.MESSAGES.invalidHMACkey(e.getLocalizedMessage()), e);
} catch (InvalidKeyException ex) { LOG.log(Level.SEVERE, "InvalidKeyException should not happen.", ex); throw new CogrooException(CogrooExceptionMessages.INTERNAL_ERROR, new String[]{ex.getLocalizedMessage()}, ex); } catch (com.sun.star.uno.Exception ex) { LOG.log(Level.SEVERE, "UNO Exception should not happen.", ex);
} catch (InvalidKeyException ex) { LOG.log(Level.SEVERE, "InvalidKeyException should not happen.", ex); throw new CogrooException(CogrooExceptionMessages.INTERNAL_ERROR, new String[]{ex.getLocalizedMessage()}, ex); } catch (com.sun.star.uno.Exception ex) { LOG.log(Level.SEVERE, "UNO Exception should not happen.", ex);
private Cipher getCipher(byte[] key) throws SVNException { try { final Cipher ecipher = Cipher.getInstance("DES/ECB/NoPadding"); key = setupKey(key); ecipher.init(Cipher.ENCRYPT_MODE, new SecretKeySpec(key, "DES")); return ecipher; } catch (NoSuchAlgorithmException e) { SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.IO_ERROR, "DES encryption is not available: {0}", e.getLocalizedMessage()); SVNErrorManager.error(err, SVNLogType.NETWORK); } catch (InvalidKeyException e) { SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.IO_ERROR, "Invalid key for DES encryption: {0}", e.getLocalizedMessage()); SVNErrorManager.error(err, SVNLogType.NETWORK); } catch (NoSuchPaddingException e) { SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.IO_ERROR, "NoPadding option for DES is not available: {0}", e.getLocalizedMessage()); SVNErrorManager.error(err, SVNLogType.NETWORK); } return null; }
throw new CogrooException(CogrooExceptionMessages.INTERNAL_ERROR, new String[]{ex.getLocalizedMessage()}, ex); } catch (com.sun.star.uno.Exception ex) { LOG.log(Level.SEVERE, "UNO Exception should not happen.", ex);
throw new CogrooException(CogrooExceptionMessages.INTERNAL_ERROR, new String[]{ex.getLocalizedMessage()}, ex); } catch (com.sun.star.uno.Exception ex) { LOG.log(Level.SEVERE, "UNO Exception should not happen.", ex);
private Cipher getCipher(byte[] key) throws SVNException { try { final Cipher ecipher = Cipher.getInstance("DES/ECB/NoPadding"); key = setupKey(key); ecipher.init(Cipher.ENCRYPT_MODE, new SecretKeySpec(key, "DES")); return ecipher; } catch (NoSuchAlgorithmException e) { SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.IO_ERROR, "DES encryption is not available: {0}", e.getLocalizedMessage()); SVNErrorManager.error(err); } catch (InvalidKeyException e) { SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.IO_ERROR, "Invalid key for DES encryption: {0}", e.getLocalizedMessage()); SVNErrorManager.error(err); } catch (NoSuchPaddingException e) { SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.IO_ERROR, "NoPadding option for DES is not available: {0}", e.getLocalizedMessage()); SVNErrorManager.error(err); } return null; }
private Cipher getCipher(byte[] key) throws SVNException { try { final Cipher ecipher = Cipher.getInstance("DES/ECB/NoPadding"); key = setupKey(key); ecipher.init(Cipher.ENCRYPT_MODE, new SecretKeySpec(key, "DES")); return ecipher; } catch (NoSuchAlgorithmException e) { SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.IO_ERROR, "DES encryption is not available: {0}", e.getLocalizedMessage()); SVNErrorManager.error(err, SVNLogType.NETWORK); } catch (InvalidKeyException e) { SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.IO_ERROR, "Invalid key for DES encryption: {0}", e.getLocalizedMessage()); SVNErrorManager.error(err, SVNLogType.NETWORK); } catch (NoSuchPaddingException e) { SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.IO_ERROR, "NoPadding option for DES is not available: {0}", e.getLocalizedMessage()); SVNErrorManager.error(err, SVNLogType.NETWORK); } return null; }
private Cipher getCipher(byte[] key) throws SVNException { try { final Cipher ecipher = Cipher.getInstance("DES/ECB/NoPadding"); key = setupKey(key); ecipher.init(Cipher.ENCRYPT_MODE, new SecretKeySpec(key, "DES")); return ecipher; } catch (NoSuchAlgorithmException e) { SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.IO_ERROR, "DES encryption is not available: {0}", e.getLocalizedMessage()); SVNErrorManager.error(err, SVNLogType.NETWORK); } catch (InvalidKeyException e) { SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.IO_ERROR, "Invalid key for DES encryption: {0}", e.getLocalizedMessage()); SVNErrorManager.error(err, SVNLogType.NETWORK); } catch (NoSuchPaddingException e) { SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.IO_ERROR, "NoPadding option for DES is not available: {0}", e.getLocalizedMessage()); SVNErrorManager.error(err, SVNLogType.NETWORK); } return null; }
} catch (InvalidKeyException ex) { LOG.log(Level.SEVERE, "InvalidKeyException should not happen.", ex); throw new CogrooException(CogrooExceptionMessages.INTERNAL_ERROR, new String[]{ex.getLocalizedMessage()}, ex); } catch (com.sun.star.uno.Exception ex) { LOG.log(Level.SEVERE, "UNO Exception should not happen.", ex);
} catch (InvalidKeyException ex) { LOG.log(Level.SEVERE, "InvalidKeyException should not happen.", ex); throw new CogrooException(CogrooExceptionMessages.INTERNAL_ERROR, new String[]{ex.getLocalizedMessage()}, ex); } catch (com.sun.star.uno.Exception ex) { LOG.log(Level.SEVERE, "UNO Exception should not happen.", ex);
onSuccess(req, res, next, auth0User); } catch (InvalidKeyException e) { throw new Auth0Exception("InvalidKeyException thrown while decoding JWT token " + e.getLocalizedMessage()); } catch (NoSuchAlgorithmException e) { throw new Auth0Exception("NoSuchAlgorithmException thrown while decoding JWT token " + e.getLocalizedMessage());
throw new DPKException("Failed to encrypt DPK. Cause: " + e.getLocalizedMessage(), e); } catch (NoSuchPaddingException e) { throw new DPKException("Failed to encrypt DPK. Cause: " + e.getLocalizedMessage(), e);