Model: Interface: Add a public key computed property
This commit is contained in:
parent
1f166c8d3e
commit
a4016afd7c
|
@ -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