Example implementation of the font decoder filter. More...
#include <stdio.h>
#include <string.h>
#include "skinkit.h"
#include "ripthread.h"
#include "swdevice.h"
#include "skindevs.h"
#include "devutils.h"
Data Structures | |
struct | _fd_state |
Encapsulates the state of the font decryption device. More... | |
Typedefs | |
typedef struct _fd_state | FD_STATE |
Encapsulates the state of the font decryption device. | |
Functions | |
static int32 | FDread (FD_STATE *FDSTATE) |
Called from FDGetc when needs more data. | |
Variables | |
DEVICETYPE | FontNDcrypt_Device_Type |
Device type structure for the font decryption device. | |
Example implementation of the font decoder filter.
If you wish to test font encoding as well as decoding, define the symbol TEST_ENCRYPTFONT
instead of TEST_DECRYPTFONT
. There are two algorithms supported by this code, showing how to implement multiple strategies.
The following code is the encryption algorithm that we're testing for:
These encryptions cannot be pre-verified, so the code here will not return DeviceIOError to say "this isn't in my code," most most other features of the filter will be exercised.