The QKnxNetIpSessionAuthenticateProxy::Builder class provides the means to create a KNXnet/IP session authentication frame. 更多...
Builder (const Builder & other ) | |
Builder () | |
Builder & | operator= (const Builder & other ) |
~Builder () | |
QKnxNetIpFrame | create () const |
Builder & | setMessageAuthenticationCode (const QKnxByteArray & data ) |
Builder & | setUserId (QKnxNetIp::SecureUserId userId ) |
This class is part of the Qt KNX module and currently available as a Technology Preview, and therefore the API and functionality provided by the class may be subject to change at any time without prior notice.
This frame will be sent by the KNXnet/IP secure client to the control endpoint of the KNXnet/IP secure server after the Diffie-Hellman handshake to authenticate the user against the server device. The maximum time a KNXnet/IP secure client will wait for an authentication status response of the KNXnet/IP secure server is 10 seconds.
The common way to create a session authentication frame is:
auto auth = ... // create the full 128 bit CCM-MAC auto netIpFrame = QKnxNetIpSessionAuthenticateProxy::builder() .setUserId(QKnxNetIp::SecureUserId::Management) .setMessageAuthenticationCode(auth) .create();
另请参阅 QKnxCryptographicEngine .
构造副本为 other .
Creates a new empty session authentication frame builder.
赋值指定 other 到此对象。
销毁对象并释放任何分配资源。
Creates and returns a KNXnet/IP session authentication frame.
注意: The returned frame may be invalid depending on the values used during setup.
另请参阅 isValid ().
Sets the AES128 CCM message authentication code (MAC) of the generic KNXnet/IP session authentication frame to
data
and returns a reference to the builder. The MAC has a fixed size of
16
字节。
Sets the user ID of the KNXnet/IP session authentication frame to userId and returns a reference to the builder.
注意:
A
userId
() with the value
QKnxNetIp::SecureUserId::Reserved
or equal to or more than
QKnxNetIp::SecureUserId::Invalid
is considered invalid according to the KNX application note AN159.