Update module golang.org/x/crypto to v0.23.0

This commit is contained in:
Renovate Bot
2024-06-04 16:16:02 +00:00
parent 4a86315749
commit e07f228815
345 changed files with 57550 additions and 20044 deletions

View File

@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// +build windows
//go:build windows
// Package windows contains an interface to the low-level operating system
// primitives. OS details vary depending on the underlying system, and
@@ -29,8 +29,6 @@ import (
"strings"
"syscall"
"unsafe"
"golang.org/x/sys/internal/unsafeheader"
)
// ByteSliceFromString returns a NUL-terminated slice of bytes
@@ -82,13 +80,7 @@ func BytePtrToString(p *byte) string {
ptr = unsafe.Pointer(uintptr(ptr) + 1)
}
var s []byte
h := (*unsafeheader.Slice)(unsafe.Pointer(&s))
h.Data = unsafe.Pointer(p)
h.Len = n
h.Cap = n
return string(s)
return string(unsafe.Slice(p, n))
}
// Single-word zero for use when we need a valid pointer to 0 bytes.