add extra comment
Signed-off-by: Tim Ramlot <42113979+inteon@users.noreply.github.com>
This commit is contained in:
parent
eac230f93e
commit
2dc22bc8e7
@ -72,6 +72,11 @@ func ComputeSecureUniqueDeterministicNameFromData(fullName string, maxNameLength
|
||||
return "", err
|
||||
}
|
||||
|
||||
// Although fullName is already a DNS subdomain, we can't just cut it
|
||||
// at N characters and expect another DNS subdomain. That's because
|
||||
// we might cut it right after a ".", which would give an invalid DNS
|
||||
// subdomain (eg. test.-<hash>). So we make sure the last character
|
||||
// is an alpha-numeric character.
|
||||
prefix := DNSSafeShortenToNCharacters(fullName, maxNameLength-hashLength-1)
|
||||
hashResult := hash.Sum(nil)
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user