From 5e8509d5f1fc5be8dc23e7d56a64861b74340087 Mon Sep 17 00:00:00 2001 From: consuelita Date: Wed, 13 Dec 2023 17:16:06 -0600 Subject: [PATCH] Remove CryptPrints --- .../Async/AsyncDarkStarServer.swift | 28 +++++++++---------- .../Async/AsyncDarkstarCipher.swift | 12 ++++---- 2 files changed, 20 insertions(+), 20 deletions(-) diff --git a/Sources/ShadowSwift/Async/AsyncDarkStarServer.swift b/Sources/ShadowSwift/Async/AsyncDarkStarServer.swift index 62f79a4..b6359d4 100644 --- a/Sources/ShadowSwift/Async/AsyncDarkStarServer.swift +++ b/Sources/ShadowSwift/Async/AsyncDarkStarServer.swift @@ -136,13 +136,13 @@ public class AsyncDarkstarServer let data = Data(result) - print("~~> handleServerConfirmationCode <~~") - print("ecdhData (\(ecdhData.count) bytes): \(ecdhData.hex)") - print("serverIdentifier (\(serverIdentifier.count) bytes): \(serverIdentifier.hex)") - print("serverPersistentPublicKey (\(serverPersistentPublicKeyDarkstarFormat.count) bytes): \(serverPersistentPublicKeyDarkstarFormat.hex)") - print("clientEphemeralPublicKeyData (\(clientEphemeralPublicKeyDarkstarFormat.count) bytes): \(clientEphemeralPublicKeyDarkstarFormat.hex)") - print("server confirmation code server copy (\(data.count) bytes): \(data.hex)") - print("~~> handleServerConfirmationCode <~~") +// print("~~> handleServerConfirmationCode <~~") +// print("ecdhData (\(ecdhData.count) bytes): \(ecdhData.hex)") +// print("serverIdentifier (\(serverIdentifier.count) bytes): \(serverIdentifier.hex)") +// print("serverPersistentPublicKey (\(serverPersistentPublicKeyDarkstarFormat.count) bytes): \(serverPersistentPublicKeyDarkstarFormat.hex)") +// print("clientEphemeralPublicKeyData (\(clientEphemeralPublicKeyDarkstarFormat.count) bytes): \(clientEphemeralPublicKeyDarkstarFormat.hex)") +// print("server confirmation code server copy (\(data.count) bytes): \(data.hex)") +// print("~~> handleServerConfirmationCode <~~") try await connection.write(data) } @@ -196,13 +196,13 @@ public class AsyncDarkstarServer let result = hash.finalize() let resultData = Data(result) - print("~~> generateClientConfirmationCode <~~") - print("ecdhData (\(ecdhData.count) bytes): \(ecdhData.hex)") - print("serverIdentifier (\(serverIdentifier.count) bytes): \(serverIdentifier.hex)") - print("serverPersistentPublicKey (\(serverPersistentPublicKeyDarkstarFormat.count) bytes): \(serverPersistentPublicKeyDarkstarFormat.hex)") - print("clientEphemeralPublicKeyData (\(clientEphemeralPublicKeyDarkstarFormat.count) bytes): \(clientEphemeralPublicKeyDarkstarFormat.hex)") - print("client confirmation code server copy (\(resultData.count) bytes): \(resultData.hex)") - print("~~> generateClientConfirmationCode <~~") +// print("~~> generateClientConfirmationCode <~~") +// print("ecdhData (\(ecdhData.count) bytes): \(ecdhData.hex)") +// print("serverIdentifier (\(serverIdentifier.count) bytes): \(serverIdentifier.hex)") +// print("serverPersistentPublicKey (\(serverPersistentPublicKeyDarkstarFormat.count) bytes): \(serverPersistentPublicKeyDarkstarFormat.hex)") +// print("clientEphemeralPublicKeyData (\(clientEphemeralPublicKeyDarkstarFormat.count) bytes): \(clientEphemeralPublicKeyDarkstarFormat.hex)") +// print("client confirmation code server copy (\(resultData.count) bytes): \(resultData.hex)") +// print("~~> generateClientConfirmationCode <~~") return resultData } diff --git a/Sources/ShadowSwift/Async/AsyncDarkstarCipher.swift b/Sources/ShadowSwift/Async/AsyncDarkstarCipher.swift index 76b4758..43baef8 100644 --- a/Sources/ShadowSwift/Async/AsyncDarkstarCipher.swift +++ b/Sources/ShadowSwift/Async/AsyncDarkstarCipher.swift @@ -273,12 +273,12 @@ public class AsyncDarkstarCipher return nil } - print("\n~~> AsyncDarkStarCipher Decrypt <~~") - print("Ciphertext (\(encrypted.count) bytes): \(encrypted.hex)") - print("nonce (\(nonce.data.count) bytes): \(nonce.data.hex)") - print("tag (\(tag.count) bytes): \(tag.hex)") - print("key (\(self.key.data.count) bytes): \(self.key.data.hex)") - print("~~> AsyncDarkStarCipher Decrypt <~~\n") +// print("\n~~> AsyncDarkStarCipher Decrypt <~~") +// print("Ciphertext (\(encrypted.count) bytes): \(encrypted.hex)") +// print("nonce (\(nonce.data.count) bytes): \(nonce.data.hex)") +// print("tag (\(tag.count) bytes): \(tag.hex)") +// print("key (\(self.key.data.count) bytes): \(self.key.data.hex)") +// print("~~> AsyncDarkStarCipher Decrypt <~~\n") let sealedBox = try AES.GCM.SealedBox(nonce: nonce, ciphertext: encrypted, tag: tag) let plaintext = try AES.GCM.open(sealedBox, using: self.key)