Skip to content

Commit

Permalink
Use SotoInternal to hide extensions (#601)
Browse files Browse the repository at this point in the history
  • Loading branch information
adam-fowler authored Jan 2, 2024
1 parent 99c684b commit de23bcb
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import struct Foundation.TimeInterval
import struct Foundation.URL
import Logging
import NIOHTTP1
import SotoSignerV4
@_spi(SotoInternal) import SotoSignerV4

/// Middleware that runs an endpoint discovery function to set service endpoint
/// prior to running operation
Expand Down
1 change: 1 addition & 0 deletions Sources/SotoCore/Middleware/Middleware/S3Middleware.swift
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@

import Crypto
import Foundation
@_spi(SotoInternal) import SotoSignerV4
@_implementationOnly import SotoXML

/// Middleware applied to S3 service
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
//===----------------------------------------------------------------------===//

import Crypto
@_spi(SotoInternal) import SotoSignerV4

let MEGA_BYTE = 1024 * 1024

Expand Down
2 changes: 2 additions & 0 deletions Sources/SotoSignerV4/signer.swift
Original file line number Diff line number Diff line change
Expand Up @@ -433,13 +433,15 @@ extension String {
static let queryAllowedCharacters = CharacterSet(charactersIn: "/;+").inverted
}

@_spi(SotoInternal)
public extension Sequence where Element == UInt8 {
/// return a hexEncoded string buffer from an array of bytes
func hexDigest() -> String {
return self.map { String(format: "%02x", $0) }.joined(separator: "")
}
}

@_spi(SotoInternal)
public extension URL {
/// return URL path, but do not remove the slash at the end if it exists.
///
Expand Down

0 comments on commit de23bcb

Please sign in to comment.