Documentation
¶
Index ¶
- func CollapseWhitespace(text string) string
- func ComposeJamoSequences(text string) string
- func ContainsSuspiciousBase64(input string) bool
- func DecodeBase64Candidate(input string) ([]byte, error)
- func DecodedCandidateFitsBudget(candidate string) bool
- func EncodingSyntaxNeedsNormalization(text string) bool
- func IsReadableText(data []byte) bool
- func JoinShortSeparators(text string, maxRun int) string
- func Normalize(text string) string
- func NormalizeASCIIByteReplacement(value byte) (string, bool)
- func NormalizeEncodingSyntax(text string) string
- func NormalizePostProcess(text string) string
- func SanitizeUTF8(text string) string
- func StripControlChars(text string) string
- func StripFormatAndCombining(text string) string
- type DecodeResult
- func DecodeCandidates(input string) DecodeResult
- func DecodeCandidatesWithContext(input string) DecodeResult
- func DecodeCandidatesWithContextForMatching(input string, mayContribute func(string) bool) DecodeResult
- func DecodeCandidatesWithContextForProtected(input string, mayContribute ...func(string) bool) DecodeResult
- func DecodeCandidatesWithContextForRuleOwner[T any](input string, owner T, mayContribute func(T, string) bool) DecodeResult
- func DecodeCandidatesWithContextForRules(input string, mayContribute func(string) bool) DecodeResult
- type DecodeStatus
- type Views
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CollapseWhitespace ¶
func ComposeJamoSequences ¶
func DecodeBase64Candidate ¶
func DecodedCandidateFitsBudget ¶ added in v1.30.1
DecodedCandidateFitsBudget은 단일 decode candidate가 admission 크기 한도 안에 있는지 보고한다.
func EncodingSyntaxNeedsNormalization ¶ added in v1.30.1
func IsReadableText ¶
func JoinShortSeparators ¶
func NormalizeASCIIByteReplacement ¶ added in v1.30.1
func NormalizeEncodingSyntax ¶ added in v1.30.1
NormalizeEncodingSyntax는 Base64 대소문자를 보존하면서 호환 문법과 인코딩 경계의 format/control 문자를 정규화한다.
func NormalizePostProcess ¶
func SanitizeUTF8 ¶
func StripControlChars ¶
func StripFormatAndCombining ¶
Types ¶
type DecodeResult ¶ added in v1.30.1
type DecodeResult struct {
Candidates []string
Status DecodeStatus
// contains filtered or unexported fields
}
func DecodeCandidates ¶
func DecodeCandidates(input string) DecodeResult
DecodeCandidates는 읽을 수 있는 지원 인코딩을 너비 우선으로 확장하고 미완료 원인을 Status에 남긴다.
func DecodeCandidatesWithContext ¶ added in v1.30.1
func DecodeCandidatesWithContext(input string) DecodeResult
DecodeCandidatesWithContext는 주변 평문을 보존한 채 지원 인코딩을 확장한다.
func DecodeCandidatesWithContextForMatching ¶ added in v1.30.1
func DecodeCandidatesWithContextForMatching(input string, mayContribute func(string) bool) DecodeResult
DecodeCandidatesWithContextForMatching은 matcher에 기여할 수 있는 긴 인코딩 구간만 주변 문맥과 함께 확장한다.
func DecodeCandidatesWithContextForProtected ¶ added in v1.30.1
func DecodeCandidatesWithContextForProtected(input string, mayContribute ...func(string) bool) DecodeResult
DecodeCandidatesWithContextForProtected는 protected text에 기여할 수 있는 짧은 Base64·hex 조각만 bounded BFS에 추가한다.
func DecodeCandidatesWithContextForRuleOwner ¶ added in v1.30.1
func DecodeCandidatesWithContextForRuleOwner[T any](input string, owner T, mayContribute func(T, string) bool) DecodeResult
DecodeCandidatesWithContextForRuleOwner avoids allocating an owner-bound callback when the input has no transform surface.
func DecodeCandidatesWithContextForRules ¶ added in v1.30.1
func DecodeCandidatesWithContextForRules(input string, mayContribute func(string) bool) DecodeResult
DecodeCandidatesWithContextForRules expands standard transforms and short Base64/hex fragments that can contribute to a compiled rule. All paths share the existing decode budgets and retain fail-closed status reporting.
func (DecodeResult) Complete ¶ added in v1.30.1
func (r DecodeResult) Complete() bool
type DecodeStatus ¶ added in v1.30.1
type DecodeStatus uint8
DecodeStatus는 제한 안에서 완료하지 못한 decode 작업을 나타낸다.
const ( DecodeCandidateLimit DecodeStatus = 1 << iota DecodeByteLimit DecodeDepthLimit DecodeScanLimit )