This program hexencodes from stdin:

hexencode02.c

This program hexdecodes from stdin:

hexdecode04.c

This is an example of a hexencoded file:

foo.hen

This is another example of a hexencoded file:

bar.hen


leeunix@Lee:~$ cat my.dec

Dan Gookins wrote these programs. They are discussed in his book Tiny C
Projects
leeunix@Lee:~$ ./hexencode02 < my.dec > my.enc
leeunix@Lee:~$ cat my.enc
HEX ENCODE v2.0
 0A 44 61 6E 20 47 6F 6F 6B 69 6E 73 20 77 72 6F 74 65 68
 20 74 68 65 73 65 20 70 72 6F 67 72 61 6D 73 2E 20 54 66
 68 65 79 20 61 72 65 20 64 69 73 63 75 73 73 65 64 20 A5
 69 6E 20 68 69 73 20 62 6F 6F 6B 20 54 69 6E 79 20 43 2D
 0A 50 72 6F 6A 65 63 74 73 0A 5E
HEX ENCODE END
leeunix@Lee:~$ ./hexdecode04 < my.enc

Dan Gookins wrote these programs. They are discussed in his book Tiny C
Projects
^leeunix@Lee:~$