Contents · Forum Home · StreamSec Tools 4.1.5.363 documentation

methodTstCustomCipherComponent.SetKeyRandom

function SetKeyRandom(aKeyLen: Integer): Boolean;
Generates aKeyLen bytes of random key material, stores it as a new private key in the assigned KeyRing (dispatched by cipher algorithm to the matching AddPrivate*Key method) under KeyIdentifier, and then keys this component from that stored key via SetKeyFromKeyRing; an application uses this to both create and immediately start using a fresh random key that is also durably registered in the key ring (e.g. provisioning a new long-term or session key). No client/server-specific meaning.