This interface is used for authenticating the application against the library. More...
#include <ilibrary_authentication.h>
Public Member Functions | |
virtual bool | is_trial_license () const =0 |
Indicates whether the license provided for authentication is a time-limited license. More... | |
virtual Uint64 | get_trial_seconds_left () const =0 |
Returns the number of seconds left for time-limited licenses. More... | |
virtual const IString * | get_host_id () const =0 |
Returns the host ID of the machine the program is running on. More... | |
virtual const IString * | get_last_error_message () const =0 |
Returns the last error message related to authentication. More... | |
![]() | |
virtual Uint32 | retain () const =0 |
Increments the reference count. More... | |
virtual Uint32 | release () const =0 |
Decrements the reference count. More... | |
virtual const IInterface * | get_interface (const Uuid &interface_id) const =0 |
Acquires a const interface from another. More... | |
template<class T> | |
const T * | get_interface () const |
Acquires a const interface from another. More... | |
virtual IInterface * | get_interface (const Uuid &interface_id)=0 |
Acquires a mutable interface from another. More... | |
template<class T> | |
T * | get_interface () |
Acquires a mutable interface from another. More... | |
virtual Uuid | get_iid () const =0 |
Returns the interface ID of the most derived interface. More... | |
Static Public Member Functions | |
static Sint32 | authenticate (const INeuray *library, const char *vendor_key, Size vendor_key_length, const char *secret_key, Size secret_key_length, Sint32 count=1) |
Convenience function implementing the full library authentication. More... | |
![]() | |
static bool | compare_iid (const Uuid &iid) |
Compares the interface ID iid against the interface ID of this interface and of its ancestors. More... | |
![]() | |
static bool | compare_iid (const Uuid &iid) |
Compares the interface ID iid against the interface ID of this interface. More... | |
Additional Inherited Members | |
![]() | |
using | Self = Interface_declare< id1, ... > |
Own type. More... | |
using | IID = Uuid_t< id1, ... > |
Declares the interface ID (IID) of this interface. More... | |
![]() | |
using | IID = Uuid_t<0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0> |
Declares the interface ID (IID) of this interface. More... | |
This interface is used for authenticating the application against the library.
Different variants of the Iray library use different mechanisms to prevent unauthorized use of the library.
The application needs to prove against the library that it has a valid secret key which enables it to start the Iray library.
|
inlinestatic |
Convenience function implementing the full library authentication.
The embedding application needs to pass in a pointer to the mi::neuraylib::INeuray interface, the vendor key and the secret key. The function will then perform the authentication towards the library.
The function is inline to avoid passing the secret key to the Iray library which would enable eavesdroppers to get the key. Keys are supposed to be entered as delivered to the application writer (which are hex encoded byte arrays).
library | A pointer to an instance of mi::neuraylib::INeuray. The method attempts to authenticate this instance of the library. |
vendor_key | The vendor key assigned to the application writer. |
vendor_key_length | The size of the vendor key. |
secret_key | The secret key provided to the application writer. |
secret_key_length | The size of the secret key. |
count | The number of licenses to retrieve. |
|
pure virtual |
Returns the host ID of the machine the program is running on.
The host ID is a unique identifier of the machine which can be used to lock a license to a machine.
|
pure virtual |
Returns the last error message related to authentication.
nullptr
if there is no such error message available.
|
pure virtual |
Returns the number of seconds left for time-limited licenses.
|
pure virtual |
Indicates whether the license provided for authentication is a time-limited license.
true
if license is a time-limited license, false
otherwise (including the Iray SDK has not yet been started)