mi32/crypto.h File Reference

<mi32/crypto.h> More...

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  MCRYPTOHDR

Defines

#define LIBEXPORT   MI_DLLIMPORT
#define MCRYPTO_ASCII   0x00000008
#define MCRYPTO_NeedAnyValidKey   0x00000002
#define MCRYPTO_NeedPassword   0x00000001
#define MCRYPTO_NeedSpecificKey   0x00000004
#define MCRYPTO_UsableByLite   0x00000010

Functions

LIBEXPORT int McryptoDecode (MIUNICODE **outbuf, MIUNICODE *inbuf, MIUNICODE *password, UINT32 flags)
LIBEXPORT int McryptoEncode (MIUNICODE **outbuf, MIUNICODE *inbuf, MIUNICODE *password, int keynum, UINT32 flags)
LIBEXPORT int McryptoReadHeader (MIUNICODE *ucbuf, MCRYPTOHDR *hdr, UINT32 flags)

Detailed Description

<mi32/crypto.h>

Definitions for MCRYTO structure


Define Documentation

#define LIBEXPORT   MI_DLLIMPORT
#define MCRYPTO_ASCII   0x00000008

uuencode into ASCII range for text file

#define MCRYPTO_NeedAnyValidKey   0x00000002
#define MCRYPTO_NeedPassword   0x00000001
#define MCRYPTO_NeedSpecificKey   0x00000004
#define MCRYPTO_UsableByLite   0x00000010

Can be used by TNTlite (need special license option to encrypt this way).


Function Documentation

LIBEXPORT int McryptoDecode ( MIUNICODE **  outbuf,
MIUNICODE inbuf,
MIUNICODE password,
UINT32  flags 
)

If not encoded, just copies the input.

Parameters:
outbuf Output buffer
inbuf Input buffer
password Password
flags Flags
LIBEXPORT int McryptoEncode ( MIUNICODE **  outbuf,
MIUNICODE inbuf,
MIUNICODE password,
int  keynum,
UINT32  flags 
)

Encode the input.

Parameters:
outbuf Output buffer
inbuf Input buffer
password Password
keynum Key number
flags Flags
LIBEXPORT int McryptoReadHeader ( MIUNICODE ucbuf,
MCRYPTOHDR hdr,
UINT32  flags 
)

Read the crypto header.

Returns:
1 if encrypted, 0 if not.

Note that the header is only used as an aid to tell us what decryption method to use. You could hack the header to make it not ask for a password, but it won't decrypt without it.

Parameters:
ucbuf Unicode buffer returned
hdr Crypto header returned
flags Flags

Generated on Sun Oct 7 21:25:55 2012 for TNTsdk 2012 by  doxygen 1.6.1