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

Method AsIA5String

ber/value.go:330–341  ·  view source on GitHub ↗

IA5String parseIA5String parses a ASN.1 IA5String (ASCII string) from the given byte slice and returns it.

()

Source from the content-addressed store, hash-verified

328// parseIA5String parses a ASN.1 IA5String (ASCII string) from the given
329// byte slice and returns it.
330func (v *Token) AsIA5String() (ret string, err error) {
331 v.mustBeValue()
332 bytes := v.Bytes
333 for _, b := range bytes {
334 if b >= 0x80 {
335 err = SyntaxError{"IA5String contains invalid character"}
336 return
337 }
338 }
339 ret = string(bytes)
340 return
341}
342
343// T61String
344

Callers 1

UniversalMethod · 0.95

Calls 1

mustBeValueMethod · 0.95

Tested by

no test coverage detected