methodTstCustomCipherComponent.EncryptStr
function EncryptStr(const aBuf: OctetString): OctetString;
One-shot convenience encrypt of an OctetString to a new OctetString result (not in place); the simplest way an application encrypts a small, already-in-memory plaintext value. It finishes the message, so input the padding cannot finish raises eSecComp before the cipher is given any of it (S_ERR_PartialLastBlock: with bpmNone, a length that is not a whole number of blocks, except in CFB, OFB and CTR; S_ERR_ShortForCTS: with bpmCTS, fewer octets than one block), and the component takes the next call as though it had not been made. When the cipher declines (see Encrypt), the result is empty - but in cmCCM, cmEAX and cmGCM, where every message has a tag, EncryptStr raises eSecComp (S_ERR_EncryptionFailed) instead. No client/server-specific meaning.