#include <cypher.h>
Inheritance diagram for PCypher:

Public Types | |
| enum | BlockChainMode { ElectronicCodebook, ECB = ElectronicCodebook, CypherBlockChaining, CBC = CypherBlockChaining, OutputFeedback, OFB = OutputFeedback, CypherFeedback, CFB = CypherFeedback, NumBlockChainModes } |
| Mechanism by which sequential blocks are linked. More... | |
Public Member Functions | |
| PString | Encode (const PString &str) |
| PString | Encode (const PBYTEArray &clear) |
| PString | Encode (const void *data, PINDEX length) |
| void | Encode (const PBYTEArray &clear, PBYTEArray &coded) |
| void | Encode (const void *data, PINDEX length, PBYTEArray &coded) |
| PString | Decode (const PString &cypher) |
| BOOL | Decode (const PString &cypher, PString &clear) |
| BOOL | Decode (const PString &cypher, PBYTEArray &clear) |
| PINDEX | Decode (const PString &cypher, void *data, PINDEX length) |
| PINDEX | Decode (const PBYTEArray &coded, void *data, PINDEX length) |
| BOOL | Decode (const PBYTEArray &coded, PBYTEArray &clear) |
Protected Member Functions | |
| PCypher (PINDEX blockSize, BlockChainMode chainMode) | |
| PCypher (const void *keyData, PINDEX keyLength, PINDEX blockSize, BlockChainMode chainMode) | |
| virtual void | Initialise (BOOL encoding)=0 |
| virtual void | EncodeBlock (const void *in, void *out)=0 |
| virtual void | DecodeBlock (const void *in, void *out)=0 |
Protected Attributes | |
| PBYTEArray | key |
| Key for the encryption/decryption. | |
| PINDEX | blockSize |
| Size of each encryption block in bytes. | |
| BlockChainMode | chainMode |
| Mode for sequential encryption each block. | |
|
|
Mechanism by which sequential blocks are linked.
|
|
||||||||||||
|
Create a new encryption object instance.
|
|
||||||||||||||||||||
|
|
|
||||||||||||
|
Decode the data. Decode the data using the algorithm embodied by the descendent class and the key specifed in the construction of the objects instance. The first form takes a string and returns a decoded string. The second form takes an encoded string and returns arbitrary binary data bytes. In both cases the encoded string is always 7 bit printable ASCII suitable for use in mail systems etc. The final form takes and arbitrary block of bytes and decodes them into another block of binary data.
|
|
||||||||||||||||
|
Decode the data.
|
|
||||||||||||||||
|
Decode the data.
|
|
||||||||||||
|
Decode the data.
|
|
||||||||||||
|
Decode the data.
|
|
|
Decode the data.
|
|
||||||||||||
|
Dencode an n bit block of memory according to the encryption algorithm.
Implemented in PTEACypher. |
|
||||||||||||||||
|
Encode the data. The data is encoded using the algorithm embodied by the descendent class and the key specifed in the construction of the objects instance. The first form takes a string and returns an encoded string. The second form takes arbitrary binary data bytes and returns an encoded string. In both cases the encoded string is always 7 bit printable ASCII suitable for use in mail systems etc. The final form takes and arbitrary block of bytes and encodes them into another block of binary data.
|
|
||||||||||||
|
Encode the data.
|
|
||||||||||||
|
Encode the data.
|
|
|
Encode the data.
|
|
|
Encode the data.
|
|
||||||||||||
|
Encode an n bit block of memory according to the encryption algorithm.
Implemented in PTEACypher. |
|
|
Initialise the encoding/decoding sequence.
Implemented in PTEACypher. |
|
|
Size of each encryption block in bytes.
|
|
|
Mode for sequential encryption each block.
|
|
|
Key for the encryption/decryption.
|
1.4.2