summaryrefslogtreecommitdiff
path: root/SmartDeviceLink/SDLEncryptionConfiguration.m
diff options
context:
space:
mode:
authorJoel Fischer <joeljfischer@gmail.com>2019-10-30 10:55:47 -0400
committerGitHub <noreply@github.com>2019-10-30 10:55:47 -0400
commit8ee188990f23421d76437194dde386a14a2f5986 (patch)
tree07b37557098ee608cde094e8700546ba34ed5b69 /SmartDeviceLink/SDLEncryptionConfiguration.m
parent734db0c69305f5d7cf8b0884a607e7b421be9085 (diff)
parenta32c89af9ef31c552e875fbe4e4bbadc0cc43d85 (diff)
downloadsdl_ios-8ee188990f23421d76437194dde386a14a2f5986.tar.gz
Merge pull request #1343 from smartdevicelink/develop6.4.0
v6.4.0 Release
Diffstat (limited to 'SmartDeviceLink/SDLEncryptionConfiguration.m')
-rw-r--r--SmartDeviceLink/SDLEncryptionConfiguration.m45
1 files changed, 45 insertions, 0 deletions
diff --git a/SmartDeviceLink/SDLEncryptionConfiguration.m b/SmartDeviceLink/SDLEncryptionConfiguration.m
new file mode 100644
index 000000000..dbb26b6d7
--- /dev/null
+++ b/SmartDeviceLink/SDLEncryptionConfiguration.m
@@ -0,0 +1,45 @@
+//
+// SDLEncryptionConfiguration.m
+// SmartDeviceLink
+//
+// Created by standa1 on 6/17/19.
+// Copyright © 2019 smartdevicelink. All rights reserved.
+//
+
+#import "SDLEncryptionConfiguration.h"
+
+NS_ASSUME_NONNULL_BEGIN
+
+@implementation SDLEncryptionConfiguration
+
++ (instancetype)defaultConfiguration {
+ return [[self.class alloc] initWithSecurityManagers:nil delegate:nil];
+}
+
+- (instancetype)initWithSecurityManagers:(nullable NSArray<Class<SDLSecurityType>> *)securityManagers delegate:(nullable id<SDLServiceEncryptionDelegate>)delegate {
+ self = [super init];
+ if (!self) {
+ return nil;
+ }
+
+ _securityManagers = securityManagers;
+ _delegate = delegate;
+
+ return self;
+}
+
+#pragma mark - NSCopying
+
+- (id)copyWithZone:(nullable NSZone *)zone {
+ SDLEncryptionConfiguration *newConfig = [[self.class allocWithZone:zone] init];
+
+ newConfig.securityManagers = self.securityManagers;
+ newConfig.delegate = self.delegate;
+
+ return newConfig;
+}
+
+
+@end
+
+NS_ASSUME_NONNULL_END