PrevNextUpHome SophiaFramework UNIVERSE 5.3
SFBCipher1
Wrapper Class for the ICipher1 interface.
#include <SFBCipher1.h.hpp>
class SFBCipher1 : public SFBParameters;
SFMTYPEDEFWRAPPER(SFBCipher1)

Inheritance diagram

 Inheritance diagram of SFBCipher1Class

Version

BREW 2.0 BREW 2.1 BREW 3.1 BREW 4.0
X X O O

Reference

BREW API ICipher1

Member

Public Functions
SFCError Process( VoidConstPtr input , UInt32 insize , VoidPtr output , UInt32Ptr outsize )
Encrypt or decrypt data.
SFCError Process( SFXBufferConstRef input , SFXBufferPtr output )
Encrypt or decrypt data.
SFCError Process( SFXAnsiStringConstRef input , SFXAnsiStringPtr output )
Encrypt or decrypt data.
SFCError ProcessLast( VoidPtr output , UInt32Ptr outsize )
Encrypt or decrypt last partial block(s) remaining from call to SFBCipher1::Process().
SFCError ProcessLast( SFXBufferPtr output )
Encrypt or decrypt last partial block(s) remaining from call to SFBCipher1::Process().
SFCError ProcessLast( SFXAnsiStringPtr output )
Encrypt or decrypt last partial block(s) remaining from call to SFBCipher1::Process().
static
SFBParametersSmp
NewInstance( SFCErrorPtr exception = null ) (inherits from SFBParameters)
Create a new SFBParameters instance.
static
SFBParametersSmp
NewInstance( AEECLSID id , SFCErrorPtr exception = null ) (inherits from SFBParameters)
Create a new SFBParameters instance.
SFCError SetParam( SInt32 id , VoidConstPtr data , UInt32 length ) (inherits from SFBParameters)
This method sets a parameter value.
SFCError SetParam( SInt32 id , SFXBufferConstRef data ) (inherits from SFBParameters)
This method sets a parameter value.
SFCError SetParam( SInt32 id , SFXAnsiStringConstRef data ) (inherits from SFBParameters)
This method sets a parameter value.

SFBCipher1::Process
Encrypt or decrypt data.
[ public ]
SFCError Process(
    VoidConstPtr input   // Pointer to data to be encrypted/decrypted 
    UInt32 insize        // Input data size in bytes 
    VoidPtr output       // Buffer to receive encrypted/decrypted data 
    UInt32Ptr outsize    // size of output buffer in bytes, returns number of bytes actually written
);
[ public ]
SFCError Process(
    SFXBufferConstRef input   // Pointer to data to be encrypted/decrypted 
    SFXBufferPtr output       // Buffer to receive encrypted/decrypted data 
);
[ public ]
SFCError Process(
    SFXAnsiStringConstRef input   // Pointer to data to be encrypted/decrypted 
    SFXAnsiStringPtr output       // Buffer to receive encrypted/decrypted data 
);

Return value

  • SUCCESS: all input bytes processed
  • EBADSTATE: cipher is not properly initialized/no key
  • EBADPARM: pointer parameter is null
  • EBUFFERTOOSMALL: output buffer not large enough

Reference

BREW API ICIPHER1_Process


SFBCipher1::ProcessLast
Encrypt or decrypt last partial block(s) remaining from call to SFBCipher1::Process().
[ public ]
SFCError ProcessLast(
    VoidPtr output      // Buffer to receive encrypted/decrypted data 
    UInt32Ptr outsize   // size of output buffer in bytes, returns number of bytes actually written
);
[ public ]
SFCError ProcessLast(
    SFXBufferPtr output   // Buffer to receive encrypted/decrypted data 
);
[ public ]
SFCError ProcessLast(
    SFXAnsiStringPtr output   // Buffer to receive encrypted/decrypted data 
);

Return value

  • SUCCESS: any remaining data has been processed.
  • EBADSTATE: cipher is not properly initialized/no key
  • EBADPARM: pointer parameter is null
  • EBUFFERTOOSMALL: output buffer not large enough

Description

For stream ciphers and streaming block modes (CTR,CFB,OFB), this usually is a no-op.

Reference

BREW API ICIPHER1_ProcessLast