Takes a symmetric key and "localizes" it with the byte sequence pointed to by "pEngineID".
This function generates a new symetric key and saves it into the file named by the parameter "pKeyFile" in PEM format. (This includes generating a new IV for the localized key.) Note, that currently the generated key file is not encrypted.
- Parameters
-
| pInKey | [ in ] A pointer to a p6ICryptoKey interface containing the master key to localize. |
| ppOutKey | [ out ] The address of a p6ICryptoKey interface pointer in which will be placed the localized key. |
| pEngineID | [ in ] SNMP specific string of variable length. This can be a binary byte sequence (i.e., not NULL terminated). |
| idSize | [ in ] The number of bytes of data pointed to by pEngineID. |
| pEntropy | [ in ] Pointer to a plugin interface to provide the entropy requried for key generation. If set to NULL, then a default entropy source will be used. |
- Returns
| Success | P6R::eOk | |
| Failure | eInvalidArg | One of the parameters is NULL or idSize is zero. |
| eNotInitialized | A successful call to initialize was not made before this call. |
| eIoError | Could not create the key file. |
| eFormatError | A symetric key has not been loaded before this call. |
| eFail | The key generation calculation failed. |