Xceed Encryption Library Documentation
Xceed Encryption control reference / Encryption Method objects / XceedRijndaelEncryptionMethod object / SetRandomInitVector method
In This Topic
    SetRandomInitVector method
    In This Topic

    Description

    The SetRandomInitVector method sets the InitVector property with a random value.

    Parameters

    None

    Return value

    None

    Associated properties

    InitVector

    Remarks

    The random number generator used isnot the one created for the Xceed Encryption Library and described in the Random number generation topic. It is the regular C random function seeded with the system's TickCount (number of milliseconds since the last boot). The reason for this is that the initialization vector is transferred unencrypted along with the encrypted data stream and thus easily readable by anyone. If the Xceed Encryption Library's random number generator was used, it would instantly expose most of the bits that may have been used to create a random encryption key!

    Declaration (DXceedEncryption and IXceedEncryption) Copy Code

    HRESULT SetRandomInitVector ()