Source File
typeconv.go
Belonging Package
github.com/refraction-networking/utls/internal/helper
package helperimport ()// Uint8to16 converts a slice of uint8 to a slice of uint16.// e.g. []uint8{0x00, 0x01, 0x00, 0x02} -> []uint16{0x0001, 0x0002}func ( []uint8) ([]uint16, error) {:= cryptobyte.String()var []uint16for !.Empty() {var uint16if .ReadUint16(&) {= append(, )} else {return nil, errors.New("ReadUint16 failed")}}return , nil}
![]() |
The pages are generated with Golds v0.8.4. (GOOS=linux GOARCH=amd64) Golds is a Go 101 project developed by Tapir Liu. PR and bug reports are welcome and can be submitted to the issue list. Please follow @zigo_101 (reachable from the left QR code) to get the latest news of Golds. |