Skip to content

Commit 3f3e045

Browse files
committed
Add additional key conversion tests
1 parent 7d2ca05 commit 3f3e045

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

Tests/SRPTests/SRPTests.swift

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,12 @@ import Crypto
44
import XCTest
55

66
final class SRPTests: XCTestCase {
7-
func testHexKeyConversion() {
8-
let hex = "0004f6789b"
9-
XCTAssertEqual(hex, SRPKey(hex: hex)?.hex)
10-
let hex2 = "4f6789b"
11-
XCTAssertEqual("04f6789b", SRPKey(hex: hex2)?.hex)
7+
func testKeyConversion() {
8+
let hex = "00000102030405060708090a0b0c0d0e0f"
9+
XCTAssertEqual(SRPKey(hex: hex)?.hex, hex)
10+
let hex2 = "102030405060708090a0b0c0d0e0f"
11+
XCTAssertEqual(SRPKey(hex: hex2)?.hex, "0102030405060708090a0b0c0d0e0f")
12+
XCTAssertEqual(SRPKey(hex: hex)?.bytes, [0,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15])
1213
}
1314

1415
func testSRPSharedSecret() {

0 commit comments

Comments
 (0)