Expand Minimize Picture-in-picture Power Device Status Voice Recognition Skip Back Skip Forward Minus Plus Play Search
Internet Explorer alert
This browser is not recommended for use with smartdevicelink.com, and may not function properly. Upgrade to a different browser to guarantee support of all features.
close alert
To Top Created with Sketch. To Top
To Bottom Created with Sketch. To Bottom
iOS Documentation
SDLSecurityType

SDLSecurityType Protocol Reference

Section Contents

Overview

A protocol used by SDL Security libraries.

Warning

Used internally

appId

The app id of the app

Objective-C

@property (nonatomic, copy) NSString *_Nonnull appId;

Swift

var appId: String { get set }

-initializeWithAppId:completionHandler:

Initialize the SDL security library with the app’s id and a completion handler

Objective-C

- (void)initializeWithAppId:(nonnull NSString *)appId
          completionHandler:
              (nonnull void (^)(NSError *_Nullable))completionHandler;

Swift

func initialize(withAppId appId: String) async throws

Parameters

appId

The app’s id

completionHandler

A handler for when the security library is initialized

-stop

Stop the security library

Objective-C

- (void)stop;

Swift

func stop()

-runHandshakeWithClientData:error:

Run the SSL/TLS handshake

Objective-C

- (nullable NSData *)runHandshakeWithClientData:(nonnull NSData *)data
                                          error:(NSError *_Nullable *_Nullable)
                                                    error;

Swift

func runHandshake(withClientData data: Data) throws -> Data

Parameters

data

The client data for the handshake

error

A returnable error

Return Value

The server handshake data

-encryptData:withError:

Encrypt data using SSL/TLS

Objective-C

- (nullable NSData *)encryptData:(nonnull NSData *)data
                       withError:(NSError *_Nullable *_Nullable)error;

Swift

func encryptData(_ data: Data) throws -> Data

Parameters

data

The data to encrypt

error

A returnable error

Return Value

The encrypted data

-decryptData:withError:

Decrypt data using SSL/TLS

Objective-C

- (nullable NSData *)decryptData:(nonnull NSData *)data
                       withError:(NSError *_Nullable *_Nullable)error;

Swift

func decryptData(_ data: Data) throws -> Data

Parameters

data

The data to decrypt

error

A returnable error

Return Value

The decrypted data

+availableMakes

The vehicle makes this security library covers

Objective-C

+ (nonnull NSSet<NSString *> *)availableMakes;

Swift

static func availableMakes() -> Set<String>

Return Value

The makes

View on GitHub.com
Previous Section Next Section