diff --git a/Sources/ElixxirDAppsSDK/Identity.swift b/Sources/ElixxirDAppsSDK/Identity.swift index 116fea14ada72e0bca8fe1881c775d1360259463..f192f6af836c7e7ffc85122e4fc5e49f7a042430 100644 --- a/Sources/ElixxirDAppsSDK/Identity.swift +++ b/Sources/ElixxirDAppsSDK/Identity.swift @@ -1,13 +1,6 @@ import Foundation -public struct Identity: Equatable, Codable { - enum CodingKeys: String, CodingKey { - case id = "ID" - case rsaPrivatePem = "RSAPrivatePem" - case salt = "Salt" - case dhKeyPrivate = "DHKeyPrivate" - } - +public struct Identity: Equatable { public init( id: Data, rsaPrivatePem: Data, @@ -25,3 +18,12 @@ public struct Identity: Equatable, Codable { public var salt: Data public var dhKeyPrivate: Data } + +extension Identity: Codable { + enum CodingKeys: String, CodingKey { + case id = "ID" + case rsaPrivatePem = "RSAPrivatePem" + case salt = "Salt" + case dhKeyPrivate = "DHKeyPrivate" + } +}