Files
stun/integrity_debug.go
Pion 76f3a9ffab Update CI configs to v0.11.37
Update lint scripts and CI configs.
2026-01-22 11:08:56 +02:00

23 lines
445 B
Go

// SPDX-FileCopyrightText: 2026 The Pion community <https://pion.ly>
// SPDX-License-Identifier: MIT
//go:build debug
// +build debug
package stun
import "fmt"
// IntegrityErr occurs when computed HMAC differs from expected.
type IntegrityErr struct {
Expected []byte
Actual []byte
}
func (i *IntegrityErr) Error() string {
return fmt.Sprintf(
"Integrity check failed: 0x%x (expected) !- 0x%x (actual)",
i.Expected, i.Actual,
)
}