Qt 4.8
Classes | Macros | Functions
qtransportauth_qws_p.h File Reference
#include <QtCore/qglobal.h>
#include "qtransportauth_qws.h"
#include "qtransportauthdefs_qws.h"
#include "qbuffer.h"
#include <qmutex.h>
#include <qdatetime.h>
#include "private/qobject_p.h"
#include <QtCore/qcache.h>

Go to the source code of this file.

Classes

class  FAREnforcer
 Enforces the False Authentication Rate. More...
 
class  QTransportAuthPrivate
 
class  SxeRegistryLocker
 

Macros

#define AUTH_DATA(x)   (unsigned char *)((x) + QSXE_HEADER_LEN)
 
#define AUTH_ID(k)   ((unsigned char)(k[QSXE_KEY_LEN]))
 Macro to manage authentication header. More...
 
#define AUTH_KEY(k)   ((unsigned char *)(k))
 
#define AUTH_SPACE(x)   ((x) + QSXE_HEADER_LEN)
 
#define QSXE_HEADER_LEN   24
 
#define QSXE_KEY_IDX   6
 
#define QSXE_LEN_IDX   4
 
#define QSXE_PROG_IDX   22
 
#define QSXE_SEQ_IDX   23
 
#define SXE_PROJ   10022
 

Functions

void * guaranteed_memset (void *v, int c, size_t n)
 

Macro Definition Documentation

◆ AUTH_DATA

#define AUTH_DATA (   x)    (unsigned char *)((x) + QSXE_HEADER_LEN)

Definition at line 122 of file qtransportauth_qws_p.h.

Referenced by QTransportAuth::authFromMessage().

◆ AUTH_ID

#define AUTH_ID (   k)    ((unsigned char)(k[QSXE_KEY_LEN]))

Macro to manage authentication header.

Format of header is:

BYTES CONTENT
0-3 magic numbers
4 length of authenticated data (max 255 bytes)

\ 5

reserved

6-21

MAC digest, or shared secret in case of simple auth

22

program id

23

sequence number

Total length of the header is 24 bytes

However this may change. Instead of coding these numbers use the AUTH_ID, AUTH_KEY, AUTH_DATA and AUTH_SPACE macros.

Definition at line 119 of file qtransportauth_qws_p.h.

◆ AUTH_KEY

#define AUTH_KEY (   k)    ((unsigned char *)(k))

Definition at line 120 of file qtransportauth_qws_p.h.

◆ AUTH_SPACE

#define AUTH_SPACE (   x)    ((x) + QSXE_HEADER_LEN)

Definition at line 123 of file qtransportauth_qws_p.h.

Referenced by QTransportAuth::authFromMessage().

◆ QSXE_HEADER_LEN

#define QSXE_HEADER_LEN   24

◆ QSXE_KEY_IDX

#define QSXE_KEY_IDX   6

◆ QSXE_LEN_IDX

#define QSXE_LEN_IDX   4

◆ QSXE_PROG_IDX

#define QSXE_PROG_IDX   22

◆ QSXE_SEQ_IDX

#define QSXE_SEQ_IDX   23

Definition at line 127 of file qtransportauth_qws_p.h.

Referenced by QTransportAuth::authToMessage().

◆ SXE_PROJ

#define SXE_PROJ   10022

Definition at line 80 of file qtransportauth_qws_p.h.

Function Documentation

◆ guaranteed_memset()

void* guaranteed_memset ( void *  v,
int  c,
size_t  n 
)
Warning
This function is not part of the public interface. memset for security purposes, guaranteed not to be optimized away http://www.faqs.org/docs/Linux-HOWTO/Secure-Programs-HOWTO.html

Definition at line 84 of file qtransportauth_qws.cpp.

85 {
86  volatile char *p = (char *)v; while (n--) *p++=c; return v;
87 }
unsigned char c[8]
Definition: qnumeric_p.h:62