| 
      
    | 
   
Creates new credentials that use a key as the secret.  
- Parameters
 - 
  
    | domainID | The domain in which the identity exists. If unknown, use DOFOBJECTIDDOMAIN_BROADCAST. This should not be NULL.  |  
    | identity | The Object ID representing the authentication identity. This should not be NULL.  |  
    | key | The secret to be used with the identity for authentication. This should not be NULL. |  
   
   
 
- Returns
 - A newly created DOFCredentials. 
  
- Exceptions
 - 
  
    | NULL | is returned if an invalid parameter was detected, or the credentials could not be created.  |  
   
   
 
- Resource Management:
 - This function allocates resources that must later be freed by calling DOFCredentials_Destroy. 
  
 
 
     |