mirror of
https://github.com/apple/swift-crypto
synced 2026-11-29 05:14:21 +00:00
Update availability annotations in tests (#213)
This commit is contained in:
1 parent
ed66091040
commit
09f7a993f6
2 files changed
+4
-2
No files matched your search
@@ -113,6 +113,7 @@ class DigestsTests: XCTestCase {
|
||||
try orFail { try testHashFunctionImplementsCoW(hf: SHA512.self) }
|
||||
}
|
||||
|
||||
@available(macOS 10.15, iOS 13.2, tvOS 13.2, watchOS 6.1, *)
|
||||
func testBlockSizes() {
|
||||
XCTAssertEqual(Insecure.MD5.blockByteCount, 64)
|
||||
XCTAssertEqual(Insecure.SHA1.blockByteCount, 64)
|
||||
|
||||
@@ -60,7 +60,7 @@ extension DataProtocol {
|
||||
var hexString: String {
|
||||
get {
|
||||
let hexLen = self.count * 2
|
||||
return String.init(unsafeUninitializedCapacity: hexLen) { buf in
|
||||
let bytes = Array(unsafeUninitializedCapacity: hexLen) { buf, count in
|
||||
var offset = 0
|
||||
|
||||
self.regions.forEach { (_) in
|
||||
@@ -70,8 +70,9 @@ extension DataProtocol {
|
||||
offset += 1
|
||||
}
|
||||
}
|
||||
return offset
|
||||
count = offset
|
||||
}
|
||||
return String(decoding: bytes, as: UTF8.self)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user