mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-06 15:58:39 +09:00
Dactyloidae iOS initial commit
This commit is contained in:
parent
daa6179d22
commit
7154a0497e
2123 changed files with 197052 additions and 0 deletions
19
mobile/ios/ClientTests/TestHashExtensions.swift
Normal file
19
mobile/ios/ClientTests/TestHashExtensions.swift
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
import Foundation
|
||||
import XCTest
|
||||
|
||||
class TestHashExtensions: XCTestCase {
|
||||
func testSha1() {
|
||||
XCTAssertEqual("test1test2".sha1.hexEncodedString, "dff964f6e3c1761b6288f5c75c319d36fb09b2b9")
|
||||
XCTAssertEqual("test2test3".sha1.hexEncodedString, "66cdfcbbf4ad73f40ae06140460ff9bb0aabaf5c")
|
||||
}
|
||||
|
||||
func testSha256() {
|
||||
let data1: Data = "4f980b6f9baa6965f760d0bf2b2ccbee483032e5df01d77bbd9e25f7517a06b9".hexDecodedData
|
||||
XCTAssertEqual("test1test2".sha256, data1)
|
||||
XCTAssertEqual("test2test3".sha256, "fc3ea28dc1801e4180cec1022b55bee7795cf3c9fd430fb5237c9d8054218e81".hexDecodedData)
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue