QCA::TextFilter

Search for usage in LXR

#include <QtCrypto>

Inheritance diagram for QCA::TextFilter:

Public Member Functions

 TextFilter (Direction dir)
 
QString arrayToString (const MemoryRegion &a)
 
MemoryRegion decode (const MemoryRegion &a)
 
QString decodeString (const QString &s)
 
Direction direction () const
 
MemoryRegion encode (const MemoryRegion &a)
 
QString encodeString (const QString &s)
 
void setup (Direction dir)
 
MemoryRegion stringToArray (const QString &s)
 
- Public Member Functions inherited from QCA::Filter
virtual void clear ()=0
 
virtual MemoryRegion final ()=0
 
virtual bool ok () const =0
 
MemoryRegion process (const MemoryRegion &a)
 
virtual MemoryRegion update (const MemoryRegion &a)=0
 

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.

Definition at line 51 of file qca_textfilter.h.

Constructor & Destructor Documentation

◆ TextFilter()

QCA::TextFilter::TextFilter ( Direction dir)

Standard constructor.

Parameters
dirthe Direction that this TextFilter should use.

Member Function Documentation

◆ arrayToString()

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
athe array to encode
Examples
base64test.cpp, hextest.cpp, publickeyexample.cpp, saslclient.cpp, and saslserver.cpp.

◆ decode()

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
athe array to decode

◆ decodeString()

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
sthe string to decode
Examples
base64test.cpp, and hextest.cpp.

◆ direction()

Direction QCA::TextFilter::direction ( ) const

The direction the TextFilter is set up to use.

◆ encode()

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
athe array to encode

◆ encodeString()

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
sthe string to encode

◆ setup()

void QCA::TextFilter::setup ( Direction dir)

Reset the TextFilter.

Parameters
dirthe Direction that this TextFilter should use.

◆ stringToArray()

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
sthe array to decode
Examples
saslclient.cpp.

Member Data Documentation

◆ _dir

Direction QCA::TextFilter::_dir
protected

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

Definition at line 154 of file qca_textfilter.h.


The documentation for this class was generated from the following file:
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:15:57 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.