 |
NAVTOR SDK
v.3.0
Software Development Kit for fast and efficient development of ECDIS, ECS and generic marine applications
|
|
Go to the documentation of this file. 1 #ifndef SDK_S63_KEYS_CONVERSION_INTERFACE_H_
12 #define SDK_S63_KEYS_CONVERSION_INTERFACE_H_
22 typedef SDKUInt8 HW_ID[5];
23 typedef SDKUInt8 M_ID[2];
24 typedef SDKUInt8 M_KEY[5];
25 typedef SDKUInt8 UserPermit[28];
27 static inline void AssignHW_ID(HW_ID& to,
const SDKUInt8* from) {
29 to[0] = from[0]; to[1] = from[1]; to[2] = from[2]; to[3] = from[3];
34 static inline bool AssignHW_ID(HW_ID& to,
const char* from,
size_t size) {
35 if (size >=
sizeof(to)) {
37 to[0] = from[0]; to[1] = from[1]; to[2] = from[2]; to[3] = from[3];
45 static inline void AssignM_ID(M_ID& to,
const SDKUInt8* from) {
47 to[0] = from[0]; to[1] = from[1];
51 static inline void AssignM_KEY(M_KEY& to,
const SDKUInt8* from) {
53 to[0] = from[0]; to[1] = from[1]; to[2] = from[2]; to[3] = from[3];
60 typedef sdk::SDKRefPtr<IS63KeysConversion> S63KeysConversionSP;
83 const UserPermit& user_permit,
88 const M_KEY& m_key,
const M_ID& m_id,
89 UserPermit& user_permit)
const throw() = 0;
93 const UserPermit& user_permit, HW_ID& hw_id,
94 M_ID& m_id)
const throw() = 0;
107 #endif // SDK_S63_KEYS_CONVERSION_INTERFACE_H_
SDKArray SymmetricCryptoKeyData
ISymmetric cryptographic key data.
Definition: symmetric_crypto_key_interface.h:29
The interface to perform conversions on HW_ID, M_ID, M_KEY, i.e. to get/parse the UserPermit,...
Definition: s63_keys_conversion_interface.h:72
Interface for symmetric cryptographic key implementation.
S63KeysConversionProps
Keys converions properties.
Definition: s63_keys_conversion_interface.h:64
Interfaces wrapper with reference count control.
virtual SDKResult SDK_CALLTYPE GetUserPermit(const HW_ID &hw_id, const M_KEY &m_key, const M_ID &m_id, UserPermit &user_permit) const =0
Generates an S-63 UserPermit using HW_ID/M_KEY/M_ID.
virtual SDKResult SDK_CALLTYPE GetCryptoKeyByHWID(const HW_ID &hw_id, sdk::crypt::SymmetricCryptoKeyData &key_data) const =0
Generates a Cryptographic Key for S-63 cell permits decryption using HW_ID.
virtual SDKResult SDK_CALLTYPE ParseUserPermit(const M_KEY &m_key, const UserPermit &user_permit, HW_ID &hw_id, M_ID &m_id) const =0
Extracts the HW_ID/M_ID from the S-63 UserPermit.
SDKInt32 SDKResult
Type of all error or return codes which SDK functions can end with.
Definition: sdk_results.h:17
virtual SDKResult SDK_CALLTYPE GetCryptoKeyByMKey(const M_KEY &m_key, const UserPermit &user_permit, sdk::crypt::SymmetricCryptoKeyData &key_data) const =0
Generates a Cryptographic Key for S-63 cell permits decryption using M_KEY and UserPermit.
Common base SDK interfaces.
@ kS63KeysConversionProp_CheckHWIDFormat
Check HW_ID format flag, kSDKAnyType_Bool.
Definition: s63_keys_conversion_interface.h:66
FWD_DECL_INTERFACE(ILWEParserWrapper)
Provides a wrapper around the message parser to get, add or remove the.