Pigpen Cipher Encryption
Your mission is simple: to write a program which receives text as input and outputs an ASCII representation of it in the Pigpen Cipher.
ASCII-only (no Unicode) characters. You must be able to handle at least 16384 characters and 256 lines.
- Replace all characters which are not new lines or in
- Case-insensitively, replace each letter with its encrypted form (see next section), inserting a trailing space on each of the three lines after each. Each encoded character is a 3*3 block of ASCII art. Replace spaces with 3*3 blocks of spaces.
- All the characters should be on the same three lines (call these three lines one pigpen-line), unless there is a new line, which starts a new pigpen-line. Leave a normal line blank between pigpen-lines.
| | | | .| |.| |. --+ for J +-+ for K +-- for L --+ +-+ +-- .| |.| |. --+ for M +-+ for N +-- for O --+ +-+ +-- .| |.| |. | for P | | for Q | for R (ABCDEFGHI are the same as JKLMNOPQR, but with the . replaced by a space) \./ V for W (note the row of 3 spaces on the top) ^ /.\ for Z (note the 3 spaces on the bottom) \ .> / for X (note the leading spaces) / <. \ for Y (note extra trailing spaces) (STUV are like WXYZ, but with the . replaced by a space)
The input "hEllo,wORLd" should produce:
+-+ +-+ | | +-- +-- +-- | --+ | | | | |. |. |. \./ |. |. |. | | | +-+ +-- +-- +-- V +-- | +-- --+
The base64 encoding of the above, with a trailing new line, is below. The md5sum is
Ky0rICstKyB8ICAgfCAgICstLSAgICAgICAgICstLSArLS0gfCAgIC0tKwp8IHwgfCB8IHwuICB8 LiAgfC4gICAgICBcLi8gfC4gIHwuICB8LiAgICB8CnwgfCArLSsgKy0tICstLSArLS0gICAgICBW ICArLS0gfCAgICstLSAtLSsK
Without a trailing new line, the md5sum is
581005bef7ee76e24c019d076d5b375f and the base64 is:
- Standard loopholes are forbidden.
- This is code golf. Shortest code wins.
*(or some other character) as a line separator.
- The example was missing a few spaces (A space should consist of the trailing spaces of the previous character, if any, itself, and its own trailing spaces). This has now been fixed.