passforios-gopenpgp/crypto/sanitize_string.go
M. Thiercelin a2fd1c6a3b
Sanitize non utf8 strings before returning them to iOS apps
In swift, strings must be strictly utf8, and when golang
returns a string with non utf8 characters, it gets translated to
an empty string for utf8.
To avoid this situation, we sanitize strings before returning them.
This behavior is only enabled when building with the "ios" build tag.
2022-11-03 12:31:05 +01:00

8 lines
107 B
Go

//go:build !ios
// +build !ios
package crypto
func sanitizeString(input string) string {
return input
}