Back to product page

Optimized property


Specifies Optimized performance (does not conform to crypto standards).

Type

A Boolean value. When set to True, optimized mode is used for encryption/decryption.

Syntax

  • Basic
object.Optimized [= value]
The Optimized(object,value) syntax has these parts:
objectAn expression evaluating to an object of type wodCrypt.
valueA Boolean value.

Remarks

When wodCrypt uses Optimized methods, you can expect to get better results. Since crypto algorithms typically don't define anything about the data being encrypted (not even the size), you have to manually prepare the data prior to encryption. in Optimized mode wodCrypt does this for you when data is encrypted - it will add random padding, include the size of block being encrypted, etc. This ensures that when you decrypt it you get exactly the same data you had when you started the process.

However, when working in Optimized mode, wodCrypt does not give results you could check/decrypt with other crypto components/libraries. So, if there's a need to perform encryption using standard methods, don't use Optimized mode. If you use it for communication between two wodCrypt components, feel free to use it to gain better results.

If Optimized is set to False, always try to encrypt data whose size is a multiple of the BlockSize property value. Otherwise, wodCrypt will add spaces to your message to fill the gaps. When such a message is decrypted, it will contain these spaces, since wodCrypt cannot know the original message size.

Platforms

Windows