mirror of
https://github.com/meshtastic/Meshtastic-Apple.git
synced 2026-04-20 22:13:56 +00:00
Add 1 byte key to channel validation.
This commit is contained in:
parent
08de61ee71
commit
989b6c41e5
1 changed files with 3 additions and 1 deletions
|
|
@ -68,6 +68,8 @@ struct Channels: View {
|
|||
channelKeySize = 0
|
||||
} else if channelKey == "AQ==" {
|
||||
channelKeySize = -1
|
||||
} else if channelKey.count == 4 {
|
||||
channelKeySize = 1
|
||||
} else if channelKey.count == 24 {
|
||||
channelKeySize = 16
|
||||
} else if channelKey.count == 32 {
|
||||
|
|
@ -303,7 +305,7 @@ struct Channels: View {
|
|||
}
|
||||
.onAppear {
|
||||
let tempKey = Data(base64Encoded: channelKey) ?? Data()
|
||||
if tempKey.count == channelKeySize || channelKeySize == -1{
|
||||
if tempKey.count == channelKeySize || channelKeySize == -1 {
|
||||
hasValidKey = true
|
||||
}
|
||||
else {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue