Code example for NoSuchPaddingException

Methods: getMessage

0
		} catch (InvalidKeySpecException e) {
			/* Shouldn't happen: our key specs match our algorithms. */ 
			throw new TypeNotPresentException(e.getMessage(), e);
		} catch (NoSuchPaddingException e) {
			/* Shouldn't happen: we don't specify any padding schemes. */ 
			throw new TypeNotPresentException(e.getMessage(), e);
		} 
	} 
 
	public void cryptUpdate(byte[] in, int length) {
		try { 
			/* 
			 * We must implement CTR mode by hand, because WinZip's AES encryption 
			 * scheme is incompatible with Java's AES/CTR/NoPadding. 
			 */ 
			for (int i = 0; i < length; ++i) {
				/* 
				 * If we've exhausted the current keystream block, we need to 
				 * increment the iv and generate another one. 
				 */ 
				if (next == BLOCK_SIZE) {