propertyTstCipher.Mode
property Mode;
Promoted from the protected base class to published; the block cipher mode of operation (ECB/CBC/ABC/CCM/EAX/GCM/etc.) this TstCipher instance uses. Must be set before any SetKey* call creates the underlying cipher. Setting it also sets PaddingMode when the current one cannot serve the new mode: bpmPKCS5 for ECB/CBC/ABC/PipedPCFB, the mode's own padding for cmCCM, cmEAX, cmGCM and cmSSHGCM, bpmNone otherwise. In the nonce modes, cmCCM, cmEAX and cmGCM, each message starts after keying with the nonce set through the cipher's parameters - (Cipher as iGCMParameters, iEAXParameters or iCCMParameters).N, for CCM also MessageLength and AdditionalDataLength - and Initialize; associated data then goes in through (Cipher as iCipherMAC).EncryptToNil. The message ends with its tag (EncryptStr, DecryptStr, DoneToDst, or iCipherMAC.GetFinalBuf or VerifyFinalBuf), which uses the nonce up: every further call raises S_ERR_NoNonce until N and Initialize start the next message, and Initialize alone raises ePaddingError "Nonce N is not set" unless N leaves room for a MessageCounter, which then advances. IVector does not set the nonce. In cmEAX associated data carries over to later messages until new associated data is given, so a message that has none passes EncryptToNil with a count of 0. No client/server-specific meaning -- both peers of a protocol using this component must agree on the mode out of band. cmPCFB and cmPipedPCFB are deprecated; cmABC is Knudsen's Accumulated Block Chaining (see tCipherMode in stSecUtils).