QCA::TextFilter Class Reference

Superclass for text based filtering algorithms. More...

#include <QtCrypto>

Inheritance diagram for QCA::TextFilter:

QCA::Filter QCA::Base64 QCA::Hex Collaboration diagram for QCA::TextFilter:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 TextFilter (Direction dir)
void setup (Direction dir)
Direction direction () const
MemoryRegion encode (const MemoryRegion &a)
MemoryRegion decode (const MemoryRegion &a)
QString arrayToString (const MemoryRegion &a)
MemoryRegion stringToArray (const QString &s)
QString encodeString (const QString &s)
QString decodeString (const QString &s)

Protected Attributes

Direction _dir

Detailed Description

Superclass for text based filtering algorithms.

This differs from Filter in that it has the concept of an algorithm that works in two directions, and supports operations on QString arguments.


Constructor & Destructor Documentation

QCA::TextFilter::TextFilter Direction  dir  ) 
 

Standard constructor.

Parameters:
dir the Direction that this TextFilter should use.


Member Function Documentation

void QCA::TextFilter::setup Direction  dir  ) 
 

Reset the TextFilter.

Parameters:
dir the Direction that this TextFilter should use.

Direction QCA::TextFilter::direction  )  const
 

The direction the TextFilter is set up to use.

MemoryRegion QCA::TextFilter::encode const MemoryRegion a  ) 
 

Process an array in the "forward" direction, returning an array.

This method runs in the forward direction, so for something like a Base64 encoding, it takes the "native" array, and returns that array encoded in base64.

Parameters:
a the array to encode

MemoryRegion QCA::TextFilter::decode const MemoryRegion a  ) 
 

Process an array in the "reverse" direction, returning an array.

This method runs in the reverse direction, so for something like a Base64 encoding, it takes a Base64 encoded array, and returns the "native" representation.

Parameters:
a the array to decode

QString QCA::TextFilter::arrayToString const MemoryRegion a  ) 
 

Process an array in the "forward" direction, returning a QString.

This is equivalent to encode(), except that it returns a QString, rather than a byte array.

Parameters:
a the array to encode
Examples:
base64test.cpp, cmsexample.cpp, hextest.cpp, publickeyexample.cpp, saslservtest.cpp, and sasltest.cpp.

MemoryRegion QCA::TextFilter::stringToArray const QString s  ) 
 

Process an string in the "reverse" direction, returning a byte array.

This is equivalent to decode(), except that it takes a QString, rather than a byte array.

Parameters:
s the array to decode

QString QCA::TextFilter::encodeString const QString s  ) 
 

Process a string in the "forward" direction, returning a string.

This is equivalent to encode(), except that it takes and returns a QString, rather than byte arrays.

Parameters:
s the string to encode

QString QCA::TextFilter::decodeString const QString s  ) 
 

Process a string in the "reverse" direction, returning a string.

This is equivalent to decode(), except that it takes and returns a QString, rather than byte arrays.

Parameters:
s the string to decode
Examples:
base64test.cpp, and hextest.cpp.


Member Data Documentation

Direction QCA::TextFilter::_dir [protected]
 

Internal state variable for the Direction that the filter operates in.


The documentation for this class was generated from the following file:
Generated on Fri Jul 6 13:24:28 2007 for Qt Cryptographic Architecture by  doxygen 1.4.6