Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release 59cee6ee206ff97a58b0102195c0b0a81e6bf67d #22

Merged
merged 1 commit into from
Sep 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ let package = Package(
swiftSettings: [.unsafeFlags(["-suppress-warnings"])]),
.binaryTarget(
name: "BitwardenFFI",
url: "https://bwlivefronttest.blob.core.windows.net/sdk/de3b6e2-BitwardenFFI.xcframework.zip",
checksum: "37e884d820907af85e788b5e0ab483bfc5aa0299e5d6b39865ad70659322a202"),
url: "https://bwlivefronttest.blob.core.windows.net/sdk/59cee6e-BitwardenFFI.xcframework.zip",
checksum: "6539debb4d746c5fda9cd4ff36828d6ff65d84ca15dcb71746ef6420ce3775a2"),
.testTarget(
name: "BitwardenSdkTests",
dependencies: ["BitwardenSdk"])
Expand Down
8 changes: 5 additions & 3 deletions Sources/BitwardenSdk/BitwardenCore.swift
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,11 @@ fileprivate extension ForeignBytes {

fileprivate extension Data {
init(rustBuffer: RustBuffer) {
// TODO: This copies the buffer. Can we read directly from a
// Rust buffer?
self.init(bytes: rustBuffer.data!, count: Int(rustBuffer.len))
self.init(
bytesNoCopy: rustBuffer.data!,
count: Int(rustBuffer.len),
deallocator: .none
)
}
}

Expand Down
8 changes: 5 additions & 3 deletions Sources/BitwardenSdk/BitwardenCrypto.swift
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,11 @@ fileprivate extension ForeignBytes {

fileprivate extension Data {
init(rustBuffer: RustBuffer) {
// TODO: This copies the buffer. Can we read directly from a
// Rust buffer?
self.init(bytes: rustBuffer.data!, count: Int(rustBuffer.len))
self.init(
bytesNoCopy: rustBuffer.data!,
count: Int(rustBuffer.len),
deallocator: .none
)
}
}

Expand Down
8 changes: 5 additions & 3 deletions Sources/BitwardenSdk/BitwardenExporters.swift
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,11 @@ fileprivate extension ForeignBytes {

fileprivate extension Data {
init(rustBuffer: RustBuffer) {
// TODO: This copies the buffer. Can we read directly from a
// Rust buffer?
self.init(bytes: rustBuffer.data!, count: Int(rustBuffer.len))
self.init(
bytesNoCopy: rustBuffer.data!,
count: Int(rustBuffer.len),
deallocator: .none
)
}
}

Expand Down
8 changes: 5 additions & 3 deletions Sources/BitwardenSdk/BitwardenFido.swift
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,11 @@ fileprivate extension ForeignBytes {

fileprivate extension Data {
init(rustBuffer: RustBuffer) {
// TODO: This copies the buffer. Can we read directly from a
// Rust buffer?
self.init(bytes: rustBuffer.data!, count: Int(rustBuffer.len))
self.init(
bytesNoCopy: rustBuffer.data!,
count: Int(rustBuffer.len),
deallocator: .none
)
}
}

Expand Down
24 changes: 13 additions & 11 deletions Sources/BitwardenSdk/BitwardenGenerators.swift
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,11 @@ fileprivate extension ForeignBytes {

fileprivate extension Data {
init(rustBuffer: RustBuffer) {
// TODO: This copies the buffer. Can we read directly from a
// Rust buffer?
self.init(bytes: rustBuffer.data!, count: Int(rustBuffer.len))
self.init(
bytesNoCopy: rustBuffer.data!,
count: Int(rustBuffer.len),
deallocator: .none
)
}
}

Expand Down Expand Up @@ -591,22 +593,22 @@ public struct PasswordGeneratorRequest {
public let avoidAmbiguous: Bool
/**
* The minimum number of lowercase characters in the generated password.
* When set, the value must be between 1 and 9. This value is ignored is lowercase is false
* When set, the value must be between 1 and 9. This value is ignored if lowercase is false.
*/
public let minLowercase: UInt8?
/**
* The minimum number of uppercase characters in the generated password.
* When set, the value must be between 1 and 9. This value is ignored is uppercase is false
* When set, the value must be between 1 and 9. This value is ignored if uppercase is false.
*/
public let minUppercase: UInt8?
/**
* The minimum number of numbers in the generated password.
* When set, the value must be between 1 and 9. This value is ignored is numbers is false
* When set, the value must be between 1 and 9. This value is ignored if numbers is false.
*/
public let minNumber: UInt8?
/**
* The minimum number of special characters in the generated password.
* When set, the value must be between 1 and 9. This value is ignored is special is false
* When set, the value must be between 1 and 9. This value is ignored if special is false.
*/
public let minSpecial: UInt8?

Expand Down Expand Up @@ -635,19 +637,19 @@ public struct PasswordGeneratorRequest {
*/avoidAmbiguous: Bool,
/**
* The minimum number of lowercase characters in the generated password.
* When set, the value must be between 1 and 9. This value is ignored is lowercase is false
* When set, the value must be between 1 and 9. This value is ignored if lowercase is false.
*/minLowercase: UInt8?,
/**
* The minimum number of uppercase characters in the generated password.
* When set, the value must be between 1 and 9. This value is ignored is uppercase is false
* When set, the value must be between 1 and 9. This value is ignored if uppercase is false.
*/minUppercase: UInt8?,
/**
* The minimum number of numbers in the generated password.
* When set, the value must be between 1 and 9. This value is ignored is numbers is false
* When set, the value must be between 1 and 9. This value is ignored if numbers is false.
*/minNumber: UInt8?,
/**
* The minimum number of special characters in the generated password.
* When set, the value must be between 1 and 9. This value is ignored is special is false
* When set, the value must be between 1 and 9. This value is ignored if special is false.
*/minSpecial: UInt8?) {
self.lowercase = lowercase
self.uppercase = uppercase
Expand Down
8 changes: 5 additions & 3 deletions Sources/BitwardenSdk/BitwardenSDK.swift
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,11 @@ fileprivate extension ForeignBytes {

fileprivate extension Data {
init(rustBuffer: RustBuffer) {
// TODO: This copies the buffer. Can we read directly from a
// Rust buffer?
self.init(bytes: rustBuffer.data!, count: Int(rustBuffer.len))
self.init(
bytesNoCopy: rustBuffer.data!,
count: Int(rustBuffer.len),
deallocator: .none
)
}
}

Expand Down
8 changes: 5 additions & 3 deletions Sources/BitwardenSdk/BitwardenSend.swift
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,11 @@ fileprivate extension ForeignBytes {

fileprivate extension Data {
init(rustBuffer: RustBuffer) {
// TODO: This copies the buffer. Can we read directly from a
// Rust buffer?
self.init(bytes: rustBuffer.data!, count: Int(rustBuffer.len))
self.init(
bytesNoCopy: rustBuffer.data!,
count: Int(rustBuffer.len),
deallocator: .none
)
}
}

Expand Down
8 changes: 5 additions & 3 deletions Sources/BitwardenSdk/BitwardenVault.swift
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,11 @@ fileprivate extension ForeignBytes {

fileprivate extension Data {
init(rustBuffer: RustBuffer) {
// TODO: This copies the buffer. Can we read directly from a
// Rust buffer?
self.init(bytes: rustBuffer.data!, count: Int(rustBuffer.len))
self.init(
bytesNoCopy: rustBuffer.data!,
count: Int(rustBuffer.len),
deallocator: .none
)
}
}

Expand Down