MCPcopy
hub / github.com/awnumar/memguard / String

Method String

buffer.go:382–385  ·  view source on GitHub ↗

* String returns a string representation of the protected region of memory. */

()

Source from the content-addressed store, hash-verified

380String returns a string representation of the protected region of memory.
381*/
382func (b *LockedBuffer) String() string {
383 slice := b.Bytes()
384 return *(*string)(unsafe.Pointer(&slice))
385}
386
387/*
388Uint16 returns a slice pointing to the protected region of memory with the data represented as a sequence of unsigned 16 bit integers. Its length will be half that of the byte slice, excluding any remaining part that doesn't form a complete uint16 value.

Callers 3

TestStringFunction · 0.80
SocketKeyFunction · 0.80

Calls 1

BytesMethod · 0.95

Tested by 2

TestStringFunction · 0.64