Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for parseBMPString (0.14 sec)

  1. src/encoding/asn1/asn1.go

    		return "", errors.New("asn1: invalid UTF-8 string")
    	}
    	return string(bytes), nil
    }
    
    // BMPString
    
    // parseBMPString parses an ASN.1 BMPString (Basic Multilingual Plane of
    // ISO/IEC/ITU 10646-1) from the given byte slice and returns it.
    func parseBMPString(bmpString []byte) (string, error) {
    	if len(bmpString)%2 != 0 {
    		return "", errors.New("pkcs12: odd-length BMP string")
    	}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Sep 08 19:04:28 UTC 2023
    - 31.8K bytes
    - Viewed (0)
  2. src/encoding/asn1/asn1_test.go

    	for i, test := range bmpStringTests {
    		encoded, err := hex.DecodeString(test.encodedHex)
    		if err != nil {
    			t.Fatalf("#%d: failed to decode from hex string", i)
    		}
    
    		decoded, err := parseBMPString(encoded)
    
    		if err != nil {
    			t.Errorf("#%d: decoding output gave an error: %s", i, err)
    			continue
    		}
    
    		if decoded != test.decoded {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Mar 29 18:24:36 UTC 2023
    - 43.6K bytes
    - Viewed (0)
Back to top