src/jpm/dg/Crypto.java
/**
	 * Calculates whether a message can be encrypted without exceeding an images
	 * capacity.
	 * 
	 * @param message
	 *            The message to encrypt.
	 * @param numPixels
	 *            The number of pixels of the cover image.
	 * @return True if and only if the encrypted message size is below image
	 *         capacity.
	 */
Calculates whether a message can be encrypted without exceeding an images
capacity.

@param message
The message to encrypt.
@param numPixels
The number of pixels of the cover image.
@return True if and only if the encrypted message size is below image
capacity.
Calculates whether a message can be encrypted without exceeding an images capacity . @param message The message to encrypt . @param numPixels The number of pixels of the cover image . @return True if and only if the encrypted message size is below image capacity .
public static boolean isBelowCapacity(String message, int numPixels) {
		byte[] clear = message.getBytes();
		long clearLen = clear.length + 6;
		long encryptedLength = (clearLen / 16 + 1) * 16;
		return (encryptedLength <= ((numPixels * 3) / 4));
	}
public static boolean isBelowCapacity ( String message , int numPixels ) { byte [ ] clear = message . getBytes ( ) ; long clearLen = clear . length + 6 ; long encryptedLength = ( clearLen / 16 + 1 ) * 16 ; return ( encryptedLength <= ( ( numPixels * 3 ) / 4 ) ) ; }
Calculates whether a message can be encrypted without exceeding an images
 capacity.
Calculates whether a message can be encrypted without exceeding an images capacity .
// Adjust for delimiters.
