Model: Interface: Add a public key computed property
Signed-off-by: Roopesh Chander <roop@roopc.net>
This commit is contained in:
parent
c689be7eff
commit
b6d41ec9de
|
@ -21,6 +21,10 @@ struct InterfaceConfiguration: Codable {
|
||||||
var mtu: UInt64? = nil
|
var mtu: UInt64? = nil
|
||||||
var dns: [DNSServer] = []
|
var dns: [DNSServer] = []
|
||||||
|
|
||||||
|
var publicKey: Data {
|
||||||
|
return Curve25519.generatePublicKey(fromPrivateKey: privateKey)
|
||||||
|
}
|
||||||
|
|
||||||
init(name: String, privateKey: Data) {
|
init(name: String, privateKey: Data) {
|
||||||
self.name = name
|
self.name = name
|
||||||
self.privateKey = privateKey
|
self.privateKey = privateKey
|
||||||
|
|
Loading…
Reference in New Issue