src/secretwriting/MonoalphabeticCipher.java
public String encrypt() {
		List<Character> plaintextchars = Converters.convertStringToListOfCharacters(getText());
		List<Character> cipherAlphabet = generateCipherAlphabet();
		List<Character> plainAlphabet = EnglishDeterminer.ALPHABET;

		List<Character> cipherchars = plaintextchars.stream().map(p -> {
			if (EnglishDeterminer.isSpaceOrPunctuation(p) || EnglishDeterminer.isInteger(p.toString())) {
				return p;
			}

			int nthLetter = plainAlphabet.indexOf(Character.toLowerCase(p));

			return Character.toUpperCase(cipherAlphabet.get(nthLetter));
		}).collect(Collectors.toList());

		return Converters.convertListToString(cipherchars);
	}
/**
	 * Encrypts a message into a monoalphabetic cipher
	 * 
	 * @param plaintext
	 * @return
	 */
Encrypts a message into a monoalphabetic cipher

@param plaintext
@return
Encrypts a message into a monoalphabetic cipher @param plaintext @return
public String encrypt() {
		List<Character> plaintextchars = Converters.convertStringToListOfCharacters(getText());
		List<Character> cipherAlphabet = generateCipherAlphabet();
		List<Character> plainAlphabet = EnglishDeterminer.ALPHABET;
		List<Character> cipherchars = plaintextchars.stream().map(p -> {
			if (EnglishDeterminer.isSpaceOrPunctuation(p) || EnglishDeterminer.isInteger(p.toString())) {
				return p;
			}
			int nthLetter = plainAlphabet.indexOf(Character.toLowerCase(p));
			return Character.toUpperCase(cipherAlphabet.get(nthLetter));
		}).collect(Collectors.toList());
		return Converters.convertListToString(cipherchars);
	}
public String encrypt ( ) { List < Character > plaintextchars = Converters . convertStringToListOfCharacters ( getText ( ) ) ; List < Character > cipherAlphabet = generateCipherAlphabet ( ) ; List < Character > plainAlphabet = EnglishDeterminer . ALPHABET ; List < Character > cipherchars = plaintextchars . stream ( ) . map ( p -> { if ( EnglishDeterminer . isSpaceOrPunctuation ( p ) || EnglishDeterminer . isInteger ( p . toString ( ) ) ) { return p ; } int nthLetter = plainAlphabet . indexOf ( Character . toLowerCase ( p ) ) ; return Character . toUpperCase ( cipherAlphabet . get ( nthLetter ) ) ; } ) . collect ( Collectors . toList ( ) ) ; return Converters . convertListToString ( cipherchars ) ; }
Encrypts a message into a monoalphabetic cipher
Encrypts a message into a monoalphabetic cipher