v2 swagger scopes added to what-changed.

Added hashing functions to all v2 and v3 models that handle security, thats the next target.
This commit is contained in:
Dave Shanley
2022-10-23 14:23:30 -04:00
parent fcd4a0f57d
commit 3bc0a3a577
12 changed files with 367 additions and 6 deletions

View File

@@ -559,8 +559,8 @@ func AreEqual(l, r Hashable) bool {
func GenerateHashString(v any) string {
if h, ok := v.(Hashable); ok {
if h != nil {
return fmt.Sprintf("%x", h.Hash())
return fmt.Sprintf(HASH, h.Hash())
}
}
return fmt.Sprintf("%x", sha256.Sum256([]byte(fmt.Sprint(v))))
return fmt.Sprintf(HASH, sha256.Sum256([]byte(fmt.Sprint(v))))
}