Skip to content
Snippets Groups Projects
Select Git revision
  • 1b96bbf2f461aa4ecb01bc2db325be65fdd84f97
  • release default
  • master protected
  • XX-4441
  • projects/crust_RELEASE
  • project/channels
  • XX-4031/memprofile
  • hotfix/RenableHistorical
  • hotfix/SpamSingleUse
  • hotfix/dynamicRestrictedUsernameList
  • waitingRoundsRewrite
  • hotfix/byte
  • quantumSecure
  • fullRateLimit
  • XX-3564/TlsCipherSuite
  • hotfix/PermissioningRestart
  • hotfix/groupNotification
  • Josh/RateLimiting
  • Josh/Databaseless
  • jonah/delete-fix
  • hotfix/client-v2.8.1
  • v3.0.0
  • 2.3.0
  • v1.1.0
  • v1.0.0
  • v0.0.1
  • v0.0.0a
  • EmptyRepo
28 results

main.go

Blame
  • ReceptionIdentity.swift 894 B
    import Foundation
    
    public struct ReceptionIdentity: Equatable {
      public init(
        id: Data,
        rsaPrivatePem: Data,
        salt: Data,
        dhKeyPrivate: Data,
        e2eGrp: Data
      ) {
        self.id = id
        self.rsaPrivatePem = rsaPrivatePem
        self.salt = salt
        self.dhKeyPrivate = dhKeyPrivate
        self.e2eGrp = e2eGrp
      }
    
      public var id: Data
      public var rsaPrivatePem: Data
      public var salt: Data
      public var dhKeyPrivate: Data
      public var e2eGrp: Data
    }
    
    extension ReceptionIdentity: Codable {
      enum CodingKeys: String, CodingKey {
        case id = "ID"
        case rsaPrivatePem = "RSAPrivatePem"
        case salt = "Salt"
        case dhKeyPrivate = "DHKeyPrivate"
        case e2eGrp = "E2eGrp"
      }
    
      public static func decode(_ data: Data) throws -> Self {
        try JSONDecoder().decode(Self.self, from: data)
      }
    
      public func encode() throws -> Data {
        try JSONEncoder().encode(self)
      }
    }