Better error cards for private messages, neighbor info rendering

This commit is contained in:
Daniel Pupius
2025-06-23 09:47:14 -07:00
parent a83f4feddb
commit dc36070355
9 changed files with 275 additions and 6 deletions
+9
View File
@@ -72,6 +72,15 @@ func RemoveChannelKey(channelId string) {
delete(channelKeys, channelId)
}
// IsChannelConfigured checks if a channel has a specific key configured
func IsChannelConfigured(channelId string) bool {
channelKeysMutex.RLock()
defer channelKeysMutex.RUnlock()
_, ok := channelKeys[channelId]
return ok
}
// PadKey ensures the key is properly padded to be a valid AES key length (16, 24, or 32 bytes)
func PadKey(key []byte) []byte {
// If key length is already valid, return as is