When calling the ActivateSession Service, the service should accept
UserIdentityToken. For the UserNameIdentityToken, we need to provide a
password and it can be the case that the password needs to be encrypted
even though the SecureChannel's SecurityPolicy is set to None.
This commit adjusts the selection of the EncryptionAlgorithm as outlined
in Table 187 Opc Part 4. In general, we should prefer the
UserTokenIdentity.SecurityPolicy, expect for when it's not specified.
When calling the ActivateSession Service, the service should accept UserIdentityToken. For the UserNameIdentityToken, we need to provide a password and it can be the case that the password needs to be encrypted even though the SecureChannel's SecurityPolicy is set to None.
This commit adjusts the selection of the EncryptionAlgorithm as outlined in Table 187 Opc Part 4. In general, we should prefer the UserTokenIdentity.SecurityPolicy, expect for when it's not specified.
See locka99/opcua#58