Code example for NoSuchAlgorithmException

Methods: getMessage

0
		    return new String(cipher.doFinal(toEncrypt.getBytes()));
		}catch(InvalidKeyException ike){
			logger.warning("InvalidKeyException occured: " + ike.getMessage());
			return null; 
		} catch (NoSuchAlgorithmException e) {
			logger.warning("NoSuchAlgorithmException occured: " + e.getMessage());
			return null; 
		} catch (NoSuchPaddingException e) {
			logger.warning("NoSuchPaddingException occured: " + e.getMessage());
			return null; 
		} catch (IllegalBlockSizeException e) {
			logger.warning("IllegalBlockSizeException occured: " + e.getMessage());
			return null; 
		} catch (BadPaddingException e) {
			logger.warning("BadPaddingException occured: " + e.getMessage());
			return null; 
		} 
	} 
	 
	public static String encryptMD5(final String toEncrypt){
		byte[] bytesOfMessage;