// SPDX-FileCopyrightText: 2023 The Pion community <https://pion.ly>
// SPDX-License-Identifier: MIT

package srtp

import (
	
)

// growBufferSize grows the buffer size to the given number of bytes.
func growBufferSize( []byte,  int) []byte {
	if  <= cap() {
		return [:]
	}

	 := make([]byte, )
	copy(, )

	return 
}

// isSameBuffer returns true if slices a and b share the same underlying buffer.
func isSameBuffer(,  []byte) bool {
	// If both are nil, they are technically the same (no buffer)
	if  == nil &&  == nil {
		return true
	}

	// If either is nil, or both have 0 capacity, they can't share backing buffer
	if cap() == 0 || cap() == 0 {
		return false
	}

	// Create a slice of length 1 from each if possible
	 := unsafe.Pointer(&[:1][0]) // nolint:gosec
	 := unsafe.Pointer(&[:1][0]) // nolint:gosec

	return  == 
}