*
*
*
*
*
*
*
*
*
*
      OPEN 'BASE64,ENCODE' TO ENC.FD ELSE CALL PLXX.STOP(201,'BASE64,ENCODE')
      OPEN 'BASE64,DECODE' TO DEC.FD ELSE CALL PLXX.STOP(201,'BASE64,DECODE')
*
      CLEARFILE ENC.FD
      CLEARFILE DEC.FD
*
      TBL = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'
*
      FOR I = 0 TO 4095
         ID = OCONV(I,'MCDX') 'R%3'
         D = TBL[INT(I/64)+1,1] : TBL[MOD(I,64)+1,1]
         WRITE D ON ENC.FD , ID
         WRITE ID ON DEC.FD , D
         IF ID[3,1] = '0' THEN
            WRITE D ON ENC.FD , ID[1,2]
         END
         IF ID[2,2] = '00' THEN
            WRITE D[1,1] : '=' ON ENC.FD , ID[1,1]
            WRITE ID[1,1] ON DEC.FD , D[1,1] : '='
         END
         PRINT I : CR :
      NEXT I
*
      WRITE '==' ON ENC.FD , ""
      WRITE "" ON DEC.FD , "=="
      WRITE "" ON DEC.FD , ""
   END
