xml.CryptoKey.deriveKey

Derives the symmetric or HMAC CryptoKey object using the given method identifier and concatenating the optional label, the mandatory seed value and the optional created date as initial random value.

Syntax

deriveKey(
   method STRING,
   label STRING,
   seed STRING,
   created STRING,
   offset INTEGER,
   size INTEGER )
  1. method is the identifier of the algorithm to apply to the password and its inputs.
  2. label is the optional label input.
  3. seed, the mandatory seed input, is the a valid Base64 string representing a random binary data you can obtain with the security.RandomGenerator.CreateRandomNumber helper method.
  4. created is the optional created date input.
  5. offset is the number of bytes the resulting octet stream must be shifted to obtain the derived key.
  6. size defines the number of bytes of the resulting derived key.

Usage

If it is a symmetric key, the size can be 0, or must match the original key according to key identifier.

See Derived keys for more details.

In case of error, the method throws an exception and sets the STATUS variable. Depending on the error, a human-readable description of the problem is available in the SQLCA.SQLERRM register. See Error handling in GWS calls (STATUS).