Suppose for some reason the previously posted encryption method isn't desirable. Well here's another scheme that tends to defeat frequency analysis, the tool that professionals use to defeat most amateur ciphers.
Use block scrambling plus fake noise.
Pick a number between say 15 and 20 and randomly select the order of the numbers. You might use a random number generator for this purpose.
The alphabet for example is normally numbered a=1, b=2 and so forth. Require your program to re-order all letters in blocks of 15, or whatever, in accord with the order you've given. A cryptanalyst must try to figure out not only which block length you've used but also which ordering. For 15, there are 15! permutations, a very high number.
Still he/she can still apply frequency analysis and, for a large enough sample, have no trouble cracking the cipher. However, you now introduce plaintext gibberish words that contain high frequencies of x's and z's and other normally low-frequency characters. Your program randomly inserts such words into the text after randomly compiling character strings of a few lengths, drawing on mostly low frequency characters with a few higher frequency ones sprinkled in.
The decoder program then matches all words against an agreed dictionary and those that are gibberish are deleted.
A better idea is not to bother with plaintext words but to insert a set of digit strings that the decoder will read as junk codewords. That is, quite often information is sent with only a subset of the possible binary digit strings of some specified length. We then take a subset of unused digit strings of various lengths and randomly intersperse them into the encoded data stream with relatively high frequencies. The decoder program automatically rejects these strings but a cryptanalyst will have a tough time with them.
Obviously, such a system must still be unambiguous, so that a noise string can't be misread as part of a text string by the deciphering program. A carefully modified Huffman method would work.