MCPcopy Create free account
hub / github.com/egonelbre/exp / AsVisibleString

Method AsVisibleString

ber/value.go:313–324  ·  view source on GitHub ↗

VisibleString AsVisibleString parses a ASN.1 VisibleString from the given byte array and returns it.

()

Source from the content-addressed store, hash-verified

311// AsVisibleString parses a ASN.1 VisibleString from the given byte
312// array and returns it.
313func (v *Token) AsVisibleString() (ret string, err error) {
314 v.mustBeValue()
315 bytes := v.Bytes
316 for _, b := range bytes {
317 if b < 0x20 {
318 err = SyntaxError{"VisibleString contains invalid character"}
319 return
320 }
321 }
322 ret = string(bytes)
323 return
324}
325
326// IA5String
327

Callers 1

UniversalMethod · 0.95

Calls 1

mustBeValueMethod · 0.95

Tested by

no test coverage detected