8.6.6 GetEncryptingKey

The GetEncryptingKey Method is used to request a key that can be used to encrypt a KeyCredential.

This Method shall be called from an encrypted SecureChannel and from a Client that has access to the SecurityAdmin Role (see 8.2).

Signature

GetEncryptingKey(
	[in]  String CredentialId
	[in]  String RequestedSecurityPolicyUri
	[out] ByteString PublicKey
	[out] String RevisedSecurityPolicyUri
);
Argument Description
CredentialIdThe unique identifier associated with the KeyCredential.
RequestedSecurityPolicyUri

The SecurityPolicy used to encrypt the secret.

If not specified the Server chooses a suitable default.

PublicKey

The Public Key used to encrypt the secret.

The format depends on the SecurityPolicyUri.

RevisedSecurityPolicyUri

The SecurityPolicy used to encrypt the secret.

It also specifies the contents of the PublicKey.

This may be different from the RequestedSecurityPolicyUri.

Method Result Codes (defined in Call Service)

Result Code Description
Bad_InvalidArgumentThe CredentialId is not valid.
Bad_UserAccessDeniedThe current user does not have the rights required.
Bad_SecurityModeInsufficientThe SecureChannel is not encrypted.

Table 137 specifies the AddressSpace representation for the GetEncryptingKey Method.

Table 137 – GetEncryptingKey Method AddressSpace Definition
Attribute Value
BrowseName0:GetEncryptingKey
References NodeClass BrowseName DataType TypeDefinition ModellingRule
0:HasPropertyVariable0:InputArguments0:Argument[] 0:PropertyTypeMandatory
0:HasPropertyVariable0:OutputArguments0:Argument[] 0:PropertyTypeMandatory