2024-05-15 23:15:00 +00:00
|
|
|
// SPDX-FileCopyrightText: 2023 The Pion community <https://pion.ly>
|
|
|
|
// SPDX-License-Identifier: MIT
|
|
|
|
|
|
|
|
//go:build debug
|
2022-03-10 09:44:48 +00:00
|
|
|
// +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,
|
|
|
|
)
|
|
|
|
}
|