Skip to content

Commit 7ff34a4

Browse files
authored
iOS: Encode hex strings in upper case to match with Android behavior (#32)
1 parent 0e40a2d commit 7ff34a4

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

packages/native-hce-module/ios/RTNHCEModuleIOSImpl.swift

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,8 @@ extension StringProtocol {
1313
}
1414

1515
extension Data {
16-
struct HexEncodingOptions: OptionSet {
17-
let rawValue: Int
18-
static let upperCase = HexEncodingOptions(rawValue: 1 << 0)
19-
}
20-
21-
func hexEncodedString(options: HexEncodingOptions = []) -> String {
22-
let format = options.contains(.upperCase) ? "%02hhX" : "%02hhx"
16+
func hexEncodedString() -> String {
17+
let format = "%02hhX"
2318
return map { String(format: format, $0) }.joined()
2419
}
2520
}

0 commit comments

Comments
 (0)