Return just <masked> when masked description
Why bother with useless hashes?
This commit is contained in:
parent
d19e029131
commit
470c50b037
|
@ -36,7 +36,6 @@
|
||||||
|
|
||||||
import Foundation
|
import Foundation
|
||||||
import __TunnelKitNative
|
import __TunnelKitNative
|
||||||
import CommonCrypto
|
|
||||||
|
|
||||||
struct CoreConfiguration {
|
struct CoreConfiguration {
|
||||||
static let identifier = "com.algoritmico.TunnelKit"
|
static let identifier = "com.algoritmico.TunnelKit"
|
||||||
|
@ -116,12 +115,13 @@ extension CustomStringConvertible {
|
||||||
guard CoreConfiguration.masksPrivateData else {
|
guard CoreConfiguration.masksPrivateData else {
|
||||||
return description
|
return description
|
||||||
}
|
}
|
||||||
var data = description.data(using: .utf8)!
|
// var data = description.data(using: .utf8)!
|
||||||
let dataCount = CC_LONG(data.count)
|
// let dataCount = CC_LONG(data.count)
|
||||||
var md = Data(count: Int(CC_SHA1_DIGEST_LENGTH))
|
// var md = Data(count: Int(CC_SHA1_DIGEST_LENGTH))
|
||||||
md.withUnsafeMutableBytes {
|
// md.withUnsafeMutableBytes {
|
||||||
_ = CC_SHA1(&data, dataCount, $0.bytePointer)
|
// _ = CC_SHA1(&data, dataCount, $0.bytePointer)
|
||||||
}
|
// }
|
||||||
return "#\(md.toHex().prefix(16))#"
|
// return "#\(md.toHex().prefix(16))#"
|
||||||
|
return "<masked>"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue