mirror of
https://github.com/leonboe1/QuickDrop.git
synced 2026-11-24 23:36:05 +00:00
Auto-start transmission when scanning QR code (merge)
This commit is contained in:
1 parent
a0c6770c51
commit
8e4f633686
12 files changed
+328
-43
No files matched your search
@@ -57,6 +57,7 @@ class NearbyConnection {
|
||||
private var clientSeq: Int32 = 0
|
||||
|
||||
private(set) var pinCode: String?
|
||||
private(set) var authKey: SymmetricKey?
|
||||
|
||||
|
||||
init(connection: NWConnection, id: String) {
|
||||
@@ -471,6 +472,7 @@ class NearbyConnection {
|
||||
let authString = NearbyConnection.hkdf(inputKeyMaterial: SymmetricKey(data: derivedSecretKey), salt: "UKEY2 v1 auth".data(using: .utf8)!, info: ukeyInfo, outputByteCount: 32)
|
||||
let nextSecret = NearbyConnection.hkdf(inputKeyMaterial: SymmetricKey(data: derivedSecretKey), salt: "UKEY2 v1 next".data(using: .utf8)!, info: ukeyInfo, outputByteCount: 32)
|
||||
|
||||
authKey = authString
|
||||
pinCode = NearbyConnection.pinCodeFromAuthKey(authString)
|
||||
|
||||
let salt = Data([0x82, 0xAA, 0x55, 0xA0, 0xD3, 0x97, 0xF8, 0x83, 0x46, 0xCA, 0x1C,
|
||||
|
||||
Reference in new issue
Block a user