SKCommon Class Reference

Inherits from NSObject
Declared in SKCommon.h

Overview

Some general methods which can help to use some of the SKManager methods correctly.

+ createPairingKey:

Create a PairingKey for the configuration of the SmartKey.

+ (SKPairingKey *)createPairingKey:(UInt32)value

Parameters

value

A value in the range: 000000-999999

Return Value

Returns nil if the value is outside of the allowed range, otherwise it returns the SKPairingKey instance.

Declared In

SKCommon.h

+ blukiiSKVersionString

Used to get the version string of the used blukiiSK.framework.

+ (NSString *)blukiiSKVersionString

Return Value

The framework version as string

Declared In

SKCommon.h

+ encryptData:withKey:

AES-Encrypt data with a given encryption key.

+ (NSData *)encryptData:(NSData *)plain withKey:(NSString *)hexStringKey

Parameters

plain

The plain data which should be encrypted.

hexStringKey

The encryption key as Hex-String with at least 16Bytes (32Characters)

Return Value

The return value contains the encrypted data. If the hexStringKey is too short, or if it contains unpermitted characters the return value will be nil.

Declared In

SKCommon.h

+ decryptData:withKey:

AES-Decrypt data with a given encryption key.

+ (NSData *)decryptData:(NSData *)enc withKey:(NSString *)hexStringKey

Parameters

enc

The encrypted data which should be decrypted.

hexStringKey

The decryption key as Hex-String with at least 16Bytes (32Characters)

Return Value

The return value contains the dectypted data. If the hexStringKey is too short, or if it contains unpermitted characters the return value will be nil.

Declared In

SKCommon.h

+ getRandomBytes:

Get n random bytes.

+ (NSData *)getRandomBytes:(UInt8)len

Parameters

len

The number of random bytes

Return Value

A NSData instance with len random bytes.

Declared In

SKCommon.h