func (b *LockedBuffer) IsMutable() bool {
	return b.Buffer.Mutable()
}
/*
IsMutable returns a boolean value indicating if a LockedBuffer is mutable.
package memguard
import (
	"bytes"
	"io"
	"os"
	"runtime"
	"unsafe"
	"github.com/awnumar/memguard/core"
)
type LockedBuffer struct {
	*core.Buffer
	*drop
}
type drop [16]byte
func newBuffer(buf *core.Buffer) *LockedBuffer {
	b := &LockedBuffer{buf, new(drop)}
	runtime.SetFinalizer(b.drop, func(_ *drop) {
		go buf.Destroy()
	})
	return b
}
func newNullBuffer() *LockedBuffer {
	return &LockedBuffer{new(core.Buffer), new(drop)}
}
func NewBuffer(size int) *LockedBuffer {
	buf, err := core.NewBuffer(size)
	if err != nil {
		return newNullBuffer()
	}
	return newBuffer(buf)
}
func NewBufferFromBytes(src []byte) *LockedBuffer {
	b := NewBuffer(len(src))
	if b.Size() == 0 {
		return b
	}
	b.Move(src)
	b.Freeze()
	return b
}
func NewBufferFromReader(r io.Reader, size int) (*LockedBuffer, error) {
	b := NewBuffer(size)
	if b.Size() == 0 {
		return b, nil
	}
	if n, err := io.ReadFull(r, b.Bytes()); err != nil {
		if n == 0 {
			b.Destroy()
			return newNullBuffer(), err
		}
		d := NewBuffer(n)
		d.Copy(b.Bytes()[:n])
		d.Freeze()
		b.Destroy()
		return d, err
	}
	b.Freeze()
	return b, nil
}
func NewBufferFromReaderUntil(r io.Reader, delim byte) (*LockedBuffer, error) {
	b := NewBuffer(os.Getpagesize())
	for i := 0; ; i++ {
		if i == b.Size() {
			c := NewBuffer(b.Size() + os.Getpagesize())
			c.Copy(b.Bytes())
			b.Destroy()
			b = c
		}
		n, err := r.Read(b.Bytes()[i : i+1])
		if n != 1 {  
			if err == nil {  
				i--  
				continue
			}
			if i == 0 {  
				b.Destroy()
				return newNullBuffer(), err
			}
			d := NewBuffer(i)
			d.Copy(b.Bytes()[:i])
			d.Freeze()
			b.Destroy()
			return d, err
		}
		if b.Bytes()[i] == delim {
			if i == 0 {
				b.Destroy()
				return newNullBuffer(), nil
			}
			d := NewBuffer(i)
			d.Copy(b.Bytes()[:i])
			d.Freeze()
			b.Destroy()
			return d, nil
		}
	}
}
func NewBufferFromEntireReader(r io.Reader) (*LockedBuffer, error) {
	b := NewBuffer(os.Getpagesize())
	for read := 0; ; {
		n, err := r.Read(b.Bytes()[read:])
		if n == 0 && err == nil {
			continue
		}
		read += n
		if err != nil {
			if err == io.EOF {
				err = nil
			}
			if read == 0 {
				b.Destroy()
				return newNullBuffer(), err
			}
			d := NewBuffer(read)
			d.Copy(b.Bytes()[:read])
			d.Freeze()
			b.Destroy()
			return d, err
		}
		if len(b.Bytes()[read:]) == 0 {
			d := NewBuffer(b.Size() + os.Getpagesize())
			d.Copy(b.Bytes())
			b.Destroy()
			b = d
		}
	}
}
func NewBufferRandom(size int) *LockedBuffer {
	b := NewBuffer(size)
	if b.Size() == 0 {
		return b
	}
	b.Scramble()
	b.Freeze()
	return b
}
func (b *LockedBuffer) Freeze() {
	b.Buffer.Freeze()
}
func (b *LockedBuffer) Melt() {
	b.Buffer.Melt()
}
func (b *LockedBuffer) Seal() *Enclave {
	e, err := core.Seal(b.Buffer)
	if err != nil {
		if err == core.ErrBufferExpired {
			return nil
		}
		core.Panic(err)
	}
	return &Enclave{e}
}
func (b *LockedBuffer) Copy(src []byte) {
	b.CopyAt(0, src)
}
func (b *LockedBuffer) CopyAt(offset int, src []byte) {
	if !b.IsAlive() {
		return
	}
	b.Lock()
	defer b.Unlock()
	core.Copy(b.Bytes()[offset:], src)
}
func (b *LockedBuffer) Move(src []byte) {
	b.MoveAt(0, src)
}
func (b *LockedBuffer) MoveAt(offset int, src []byte) {
	if !b.IsAlive() {
		return
	}
	b.Lock()
	defer b.Unlock()
	core.Move(b.Bytes()[offset:], src)
}
func (b *LockedBuffer) Scramble() {
	if !b.IsAlive() {
		return
	}
	b.Buffer.Scramble()
}
func (b *LockedBuffer) Wipe() {
	if !b.IsAlive() {
		return
	}
	b.Lock()
	defer b.Unlock()
	core.Wipe(b.Bytes())
}
func (b *LockedBuffer) Size() int {
	return len(b.Bytes())
}
func (b *LockedBuffer) Destroy() {
	b.Buffer.Destroy()
}
func (b *LockedBuffer) IsAlive() bool {
	return b.Buffer.Alive()
}