Skip to content

Commit b5f4dbd

Browse files
bitwarden/sdk-internal@a3665fd 1.0.0-2975-a3665fd - [PM-25819] Migrate cipher sharing operations to SDK (bitwarden/sdk-internal#490)
1 parent 49bee42 commit b5f4dbd

File tree

4 files changed

+59
-19
lines changed

4 files changed

+59
-19
lines changed

Package.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ let package = Package(
3030
dependencies: ["BitwardenSdk"]),
3131
.binaryTarget(
3232
name: "BitwardenFFI",
33-
url: "https://github.com/bitwarden/sdk-swift/releases/download/v1.0.0-2973-407954d/BitwardenFFI-1.0.0-407954d.xcframework.zip",
34-
checksum: "af0857de36a6442588d2b6ae879f2fbbae61c043b3a0c47c6c50e4532e6d2655")
33+
url: "https://github.com/bitwarden/sdk-swift/releases/download/v1.0.0-2975-a3665fd/BitwardenFFI-1.0.0-a3665fd.xcframework.zip",
34+
checksum: "2b3e01f42c8f2ed7022b733d034d43a9bae894f7b4d195dd2c93f1756ae682d7")
3535
]
3636
)

Sources/BitwardenSdk/BitwardenCollections.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -998,8 +998,8 @@ private let initializationResult: InitializationResult = {
998998
return InitializationResult.contractVersionMismatch
999999
}
10001000

1001-
uniffiEnsureBitwardenCoreInitialized()
10021001
uniffiEnsureBitwardenCryptoInitialized()
1002+
uniffiEnsureBitwardenCoreInitialized()
10031003
return InitializationResult.ok
10041004
}()
10051005

Sources/BitwardenSdk/BitwardenSDK.swift

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8176,17 +8176,17 @@ private let initializationResult: InitializationResult = {
81768176
uniffiCallbackInitFido2CredentialStore()
81778177
uniffiCallbackInitFido2UserInterface()
81788178
uniffiCallbackInitFolderRepository()
8179-
uniffiEnsureBitwardenStateInitialized()
8179+
uniffiEnsureBitwardenSendInitialized()
81808180
uniffiEnsureBitwardenCryptoInitialized()
8181-
uniffiEnsureBitwardenGeneratorsInitialized()
8182-
uniffiEnsureBitwardenFidoInitialized()
8183-
uniffiEnsureBitwardenCoreInitialized()
8181+
uniffiEnsureBitwardenVaultInitialized()
81848182
uniffiEnsureBitwardenSshInitialized()
81858183
uniffiEnsureBitwardenExportersInitialized()
8186-
uniffiEnsureBitwardenSendInitialized()
8187-
uniffiEnsureBitwardenCollectionsInitialized()
8188-
uniffiEnsureBitwardenVaultInitialized()
8184+
uniffiEnsureBitwardenGeneratorsInitialized()
8185+
uniffiEnsureBitwardenStateInitialized()
81898186
uniffiEnsureBitwardenEncodingInitialized()
8187+
uniffiEnsureBitwardenFidoInitialized()
8188+
uniffiEnsureBitwardenCollectionsInitialized()
8189+
uniffiEnsureBitwardenCoreInitialized()
81908190
return InitializationResult.ok
81918191
}()
81928192

Sources/BitwardenSdk/BitwardenVault.swift

Lines changed: 49 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5569,10 +5569,20 @@ public enum CipherError: Swift.Error {
55695569

55705570
case Crypto(message: String)
55715571

5572+
case Decrypt(message: String)
5573+
55725574
case Encrypt(message: String)
55735575

55745576
case AttachmentsWithoutKeys(message: String)
55755577

5578+
case OrganizationAlreadySet(message: String)
5579+
5580+
case PutShare(message: String)
5581+
5582+
case PutShareMany(message: String)
5583+
5584+
case Repository(message: String)
5585+
55765586
case Chrono(message: String)
55775587

55785588
case SerdeJson(message: String)
@@ -5601,19 +5611,39 @@ public struct FfiConverterTypeCipherError: FfiConverterRustBuffer {
56015611
message: try FfiConverterString.read(from: &buf)
56025612
)
56035613

5604-
case 3: return .Encrypt(
5614+
case 3: return .Decrypt(
5615+
message: try FfiConverterString.read(from: &buf)
5616+
)
5617+
5618+
case 4: return .Encrypt(
56055619
message: try FfiConverterString.read(from: &buf)
56065620
)
56075621

5608-
case 4: return .AttachmentsWithoutKeys(
5622+
case 5: return .AttachmentsWithoutKeys(
56095623
message: try FfiConverterString.read(from: &buf)
56105624
)
56115625

5612-
case 5: return .Chrono(
5626+
case 6: return .OrganizationAlreadySet(
56135627
message: try FfiConverterString.read(from: &buf)
56145628
)
56155629

5616-
case 6: return .SerdeJson(
5630+
case 7: return .PutShare(
5631+
message: try FfiConverterString.read(from: &buf)
5632+
)
5633+
5634+
case 8: return .PutShareMany(
5635+
message: try FfiConverterString.read(from: &buf)
5636+
)
5637+
5638+
case 9: return .Repository(
5639+
message: try FfiConverterString.read(from: &buf)
5640+
)
5641+
5642+
case 10: return .Chrono(
5643+
message: try FfiConverterString.read(from: &buf)
5644+
)
5645+
5646+
case 11: return .SerdeJson(
56175647
message: try FfiConverterString.read(from: &buf)
56185648
)
56195649

@@ -5632,14 +5662,24 @@ public struct FfiConverterTypeCipherError: FfiConverterRustBuffer {
56325662
writeInt(&buf, Int32(1))
56335663
case .Crypto(_ /* message is ignored*/):
56345664
writeInt(&buf, Int32(2))
5635-
case .Encrypt(_ /* message is ignored*/):
5665+
case .Decrypt(_ /* message is ignored*/):
56365666
writeInt(&buf, Int32(3))
5637-
case .AttachmentsWithoutKeys(_ /* message is ignored*/):
5667+
case .Encrypt(_ /* message is ignored*/):
56385668
writeInt(&buf, Int32(4))
5639-
case .Chrono(_ /* message is ignored*/):
5669+
case .AttachmentsWithoutKeys(_ /* message is ignored*/):
56405670
writeInt(&buf, Int32(5))
5641-
case .SerdeJson(_ /* message is ignored*/):
5671+
case .OrganizationAlreadySet(_ /* message is ignored*/):
56425672
writeInt(&buf, Int32(6))
5673+
case .PutShare(_ /* message is ignored*/):
5674+
writeInt(&buf, Int32(7))
5675+
case .PutShareMany(_ /* message is ignored*/):
5676+
writeInt(&buf, Int32(8))
5677+
case .Repository(_ /* message is ignored*/):
5678+
writeInt(&buf, Int32(9))
5679+
case .Chrono(_ /* message is ignored*/):
5680+
writeInt(&buf, Int32(10))
5681+
case .SerdeJson(_ /* message is ignored*/):
5682+
writeInt(&buf, Int32(11))
56435683

56445684

56455685
}
@@ -9103,8 +9143,8 @@ private let initializationResult: InitializationResult = {
91039143
}
91049144

91059145
uniffiEnsureBitwardenCoreInitialized()
9106-
uniffiEnsureBitwardenCryptoInitialized()
91079146
uniffiEnsureBitwardenCollectionsInitialized()
9147+
uniffiEnsureBitwardenCryptoInitialized()
91089148
return InitializationResult.ok
91099149
}()
91109150

0 commit comments

Comments
 (0)