Skip to content

Commit 3aa0349

Browse files
committed
Fix up base64 deprecated warnings
Was using NIO version by mistake
1 parent 40ebbcd commit 3aa0349

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

Sources/SotoCore/AWSShapes/Base64Data.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ public struct AWSBase64Data: Sendable, Codable, Equatable {
2424

2525
/// construct `AWSBase64Data` from raw data
2626
public static func data(_ data: some Collection<UInt8>) -> Self {
27-
.init(base64String: String(base64Encoding: data))
27+
.init(base64String: String(_base64Encoding: data, options: []))
2828
}
2929

3030
/// construct `AWSBase64Data` from base64 encoded data
@@ -51,6 +51,6 @@ public struct AWSBase64Data: Sendable, Codable, Equatable {
5151

5252
/// return blob as Data
5353
public func decoded() -> [UInt8]? {
54-
try? self.base64String.base64decoded()
54+
try? self.base64String._base64Decoded()
5555
}
5656
}

Sources/SotoCore/Utils/base64.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,11 +71,11 @@
7171
// MARK: - Extensions -
7272

7373
extension String {
74-
init(base64Encoding bytes: some Collection<UInt8>, options: Base64.EncodingOptions = []) {
74+
init(_base64Encoding bytes: some Collection<UInt8>, options: Base64.EncodingOptions = []) {
7575
self = Base64.encodeString(bytes: bytes, options: options)
7676
}
7777

78-
func base64decoded(options: Base64.DecodingOptions = []) throws -> [UInt8] {
78+
func _base64Decoded(options: Base64.DecodingOptions = []) throws -> [UInt8] {
7979
try Base64.decode(string: self, options: options)
8080
}
8181
}

0 commit comments

Comments
 (0)