From e4ac48bc75064c0e144020ded1ed877d226742c8 Mon Sep 17 00:00:00 2001 From: Eric Kuck Date: Wed, 12 Dec 2018 15:33:14 -0600 Subject: More linter warnings fixed, enabled more swiftlint rules, project cleanup Signed-off-by: Eric Kuck --- WireGuard/WireGuard/Crypto/Curve25519.swift | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'WireGuard/WireGuard/Crypto/Curve25519.swift') diff --git a/WireGuard/WireGuard/Crypto/Curve25519.swift b/WireGuard/WireGuard/Crypto/Curve25519.swift index 43d9b00..53404cc 100644 --- a/WireGuard/WireGuard/Crypto/Curve25519.swift +++ b/WireGuard/WireGuard/Crypto/Curve25519.swift @@ -9,7 +9,7 @@ struct Curve25519 { static func generatePrivateKey() -> Data { var privateKey = Data(repeating: 0, count: TunnelConfiguration.keyLength) - privateKey.withUnsafeMutableBytes { (bytes: UnsafeMutablePointer) in + privateKey.withUnsafeMutableBytes { bytes in curve25519_generate_private_key(bytes) } assert(privateKey.count == TunnelConfiguration.keyLength) @@ -19,8 +19,8 @@ struct Curve25519 { static func generatePublicKey(fromPrivateKey privateKey: Data) -> Data { assert(privateKey.count == TunnelConfiguration.keyLength) var publicKey = Data(repeating: 0, count: TunnelConfiguration.keyLength) - privateKey.withUnsafeBytes { (privateKeyBytes: UnsafePointer) in - publicKey.withUnsafeMutableBytes { (bytes: UnsafeMutablePointer) in + privateKey.withUnsafeBytes { privateKeyBytes in + publicKey.withUnsafeMutableBytes { bytes in curve25519_derive_public_key(bytes, privateKeyBytes) } } -- cgit v1.2.3-59-g8ed1b