New Upstream Release - golang-github-pion-srtp.v2

Ready changes

Summary

Merged new upstream version: 2.0.16 (was: 2.0.12).

Resulting package

Built on 2023-08-13T05:29 (took 7m20s)

The resulting binary packages can be installed (if you have the apt repository enabled) by running one of:

apt install -t fresh-releases golang-github-pion-srtp.v2-dev

Lintian Result

Diff

diff --git a/.github/.gitignore b/.github/.gitignore
new file mode 100644
index 0000000..c3421a1
--- /dev/null
+++ b/.github/.gitignore
@@ -0,0 +1,4 @@
+# SPDX-FileCopyrightText: 2023 The Pion community <https://pion.ly>
+# SPDX-License-Identifier: MIT
+
+.goassets
diff --git a/.github/fetch-scripts.sh b/.github/fetch-scripts.sh
new file mode 100755
index 0000000..f333841
--- /dev/null
+++ b/.github/fetch-scripts.sh
@@ -0,0 +1,31 @@
+#!/bin/sh
+
+#
+# DO NOT EDIT THIS FILE
+#
+# It is automatically copied from https://github.com/pion/.goassets repository.
+#
+# If you want to update the shared CI config, send a PR to
+# https://github.com/pion/.goassets instead of this repository.
+#
+# SPDX-FileCopyrightText: 2023 The Pion community <https://pion.ly>
+# SPDX-License-Identifier: MIT
+
+set -eu
+
+SCRIPT_PATH="$(realpath "$(dirname "$0")")"
+GOASSETS_PATH="${SCRIPT_PATH}/.goassets"
+
+GOASSETS_REF=${GOASSETS_REF:-master}
+
+if [ -d "${GOASSETS_PATH}" ]; then
+  if ! git -C "${GOASSETS_PATH}" diff --exit-code; then
+    echo "${GOASSETS_PATH} has uncommitted changes" >&2
+    exit 1
+  fi
+  git -C "${GOASSETS_PATH}" fetch origin
+  git -C "${GOASSETS_PATH}" checkout ${GOASSETS_REF}
+  git -C "${GOASSETS_PATH}" reset --hard origin/${GOASSETS_REF}
+else
+  git clone -b ${GOASSETS_REF} https://github.com/pion/.goassets.git "${GOASSETS_PATH}"
+fi
diff --git a/.github/install-hooks.sh b/.github/install-hooks.sh
new file mode 100755
index 0000000..8aa34be
--- /dev/null
+++ b/.github/install-hooks.sh
@@ -0,0 +1,20 @@
+#!/bin/sh
+
+#
+# DO NOT EDIT THIS FILE
+#
+# It is automatically copied from https://github.com/pion/.goassets repository.
+#
+# If you want to update the shared CI config, send a PR to
+# https://github.com/pion/.goassets instead of this repository.
+#
+# SPDX-FileCopyrightText: 2023 The Pion community <https://pion.ly>
+# SPDX-License-Identifier: MIT
+
+SCRIPT_PATH="$(realpath "$(dirname "$0")")"
+
+. ${SCRIPT_PATH}/fetch-scripts.sh
+
+cp "${GOASSETS_PATH}/hooks/commit-msg.sh" "${SCRIPT_PATH}/../.git/hooks/commit-msg"
+cp "${GOASSETS_PATH}/hooks/pre-commit.sh" "${SCRIPT_PATH}/../.git/hooks/pre-commit"
+cp "${GOASSETS_PATH}/hooks/pre-push.sh" "${SCRIPT_PATH}/../.git/hooks/pre-push"
diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml
new file mode 100644
index 0000000..ea9b825
--- /dev/null
+++ b/.github/workflows/codeql-analysis.yml
@@ -0,0 +1,28 @@
+#
+# DO NOT EDIT THIS FILE
+#
+# It is automatically copied from https://github.com/pion/.goassets repository.
+# If this repository should have package specific CI config,
+# remove the repository name from .goassets/.github/workflows/assets-sync.yml.
+#
+# If you want to update the shared CI config, send a PR to
+# https://github.com/pion/.goassets instead of this repository.
+#
+# SPDX-FileCopyrightText: 2023 The Pion community <https://pion.ly>
+# SPDX-License-Identifier: MIT
+
+name: CodeQL
+
+on:
+  workflow_dispatch:
+  schedule:
+    - cron: '23 5 * * 0'
+  pull_request:
+    branches:
+      - master
+    paths:
+      - '**.go'
+
+jobs:
+  analyze:
+    uses: pion/.goassets/.github/workflows/codeql-analysis.reusable.yml@master
diff --git a/.github/workflows/generate-authors.yml b/.github/workflows/generate-authors.yml
new file mode 100644
index 0000000..ec7446c
--- /dev/null
+++ b/.github/workflows/generate-authors.yml
@@ -0,0 +1,23 @@
+#
+# DO NOT EDIT THIS FILE
+#
+# It is automatically copied from https://github.com/pion/.goassets repository.
+# If this repository should have package specific CI config,
+# remove the repository name from .goassets/.github/workflows/assets-sync.yml.
+#
+# If you want to update the shared CI config, send a PR to
+# https://github.com/pion/.goassets instead of this repository.
+#
+# SPDX-FileCopyrightText: 2023 The Pion community <https://pion.ly>
+# SPDX-License-Identifier: MIT
+
+name: Generate Authors
+
+on:
+  pull_request:
+
+jobs:
+  generate:
+    uses: pion/.goassets/.github/workflows/generate-authors.reusable.yml@master
+    secrets:
+      token: ${{ secrets.PIONBOT_PRIVATE_KEY }}
diff --git a/.github/workflows/lint.yaml b/.github/workflows/lint.yaml
new file mode 100644
index 0000000..5dd3a99
--- /dev/null
+++ b/.github/workflows/lint.yaml
@@ -0,0 +1,20 @@
+#
+# DO NOT EDIT THIS FILE
+#
+# It is automatically copied from https://github.com/pion/.goassets repository.
+# If this repository should have package specific CI config,
+# remove the repository name from .goassets/.github/workflows/assets-sync.yml.
+#
+# If you want to update the shared CI config, send a PR to
+# https://github.com/pion/.goassets instead of this repository.
+#
+# SPDX-FileCopyrightText: 2023 The Pion community <https://pion.ly>
+# SPDX-License-Identifier: MIT
+
+name: Lint
+on:
+  pull_request:
+
+jobs:
+  lint:
+    uses: pion/.goassets/.github/workflows/lint.reusable.yml@master
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
new file mode 100644
index 0000000..01227e2
--- /dev/null
+++ b/.github/workflows/release.yml
@@ -0,0 +1,24 @@
+#
+# DO NOT EDIT THIS FILE
+#
+# It is automatically copied from https://github.com/pion/.goassets repository.
+# If this repository should have package specific CI config,
+# remove the repository name from .goassets/.github/workflows/assets-sync.yml.
+#
+# If you want to update the shared CI config, send a PR to
+# https://github.com/pion/.goassets instead of this repository.
+#
+# SPDX-FileCopyrightText: 2023 The Pion community <https://pion.ly>
+# SPDX-License-Identifier: MIT
+
+name: Release
+on:
+  push:
+    tags:
+      - 'v*'
+
+jobs:
+  release:
+    uses: pion/.goassets/.github/workflows/release.reusable.yml@master
+    with:
+      go-version: '1.20' # auto-update/latest-go-version
diff --git a/.github/workflows/renovate-go-sum-fix.yaml b/.github/workflows/renovate-go-sum-fix.yaml
new file mode 100644
index 0000000..b7bb1b4
--- /dev/null
+++ b/.github/workflows/renovate-go-sum-fix.yaml
@@ -0,0 +1,24 @@
+#
+# DO NOT EDIT THIS FILE
+#
+# It is automatically copied from https://github.com/pion/.goassets repository.
+# If this repository should have package specific CI config,
+# remove the repository name from .goassets/.github/workflows/assets-sync.yml.
+#
+# If you want to update the shared CI config, send a PR to
+# https://github.com/pion/.goassets instead of this repository.
+#
+# SPDX-FileCopyrightText: 2023 The Pion community <https://pion.ly>
+# SPDX-License-Identifier: MIT
+
+name: Fix go.sum
+on:
+  push:
+    branches:
+      - renovate/*
+
+jobs:
+  fix:
+    uses: pion/.goassets/.github/workflows/renovate-go-sum-fix.reusable.yml@master
+    secrets:
+      token: ${{ secrets.PIONBOT_PRIVATE_KEY }}
diff --git a/.github/workflows/reuse.yml b/.github/workflows/reuse.yml
new file mode 100644
index 0000000..8633a12
--- /dev/null
+++ b/.github/workflows/reuse.yml
@@ -0,0 +1,22 @@
+#
+# DO NOT EDIT THIS FILE
+#
+# It is automatically copied from https://github.com/pion/.goassets repository.
+# If this repository should have package specific CI config,
+# remove the repository name from .goassets/.github/workflows/assets-sync.yml.
+#
+# If you want to update the shared CI config, send a PR to
+# https://github.com/pion/.goassets instead of this repository.
+#
+# SPDX-FileCopyrightText: 2023 The Pion community <https://pion.ly>
+# SPDX-License-Identifier: MIT
+
+name: REUSE Compliance Check
+
+on:
+  push:
+  pull_request:
+
+jobs:
+  lint:
+    uses: pion/.goassets/.github/workflows/reuse.reusable.yml@master
diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml
new file mode 100644
index 0000000..31aada4
--- /dev/null
+++ b/.github/workflows/test.yaml
@@ -0,0 +1,43 @@
+#
+# DO NOT EDIT THIS FILE
+#
+# It is automatically copied from https://github.com/pion/.goassets repository.
+# If this repository should have package specific CI config,
+# remove the repository name from .goassets/.github/workflows/assets-sync.yml.
+#
+# If you want to update the shared CI config, send a PR to
+# https://github.com/pion/.goassets instead of this repository.
+#
+# SPDX-FileCopyrightText: 2023 The Pion community <https://pion.ly>
+# SPDX-License-Identifier: MIT
+
+name: Test
+on:
+  push:
+    branches:
+      - master
+  pull_request:
+
+jobs:
+  test:
+    uses: pion/.goassets/.github/workflows/test.reusable.yml@master
+    strategy:
+      matrix:
+        go: ['1.20', '1.19'] # auto-update/supported-go-version-list
+      fail-fast: false
+    with:
+      go-version: ${{ matrix.go }}
+
+  test-i386:
+    uses: pion/.goassets/.github/workflows/test-i386.reusable.yml@master
+    strategy:
+      matrix:
+        go: ['1.20', '1.19'] # auto-update/supported-go-version-list
+      fail-fast: false
+    with:
+      go-version: ${{ matrix.go }}
+
+  test-wasm:
+    uses: pion/.goassets/.github/workflows/test-wasm.reusable.yml@master
+    with:
+      go-version: '1.20' # auto-update/latest-go-version
diff --git a/.github/workflows/tidy-check.yaml b/.github/workflows/tidy-check.yaml
new file mode 100644
index 0000000..4d346d4
--- /dev/null
+++ b/.github/workflows/tidy-check.yaml
@@ -0,0 +1,25 @@
+#
+# DO NOT EDIT THIS FILE
+#
+# It is automatically copied from https://github.com/pion/.goassets repository.
+# If this repository should have package specific CI config,
+# remove the repository name from .goassets/.github/workflows/assets-sync.yml.
+#
+# If you want to update the shared CI config, send a PR to
+# https://github.com/pion/.goassets instead of this repository.
+#
+# SPDX-FileCopyrightText: 2023 The Pion community <https://pion.ly>
+# SPDX-License-Identifier: MIT
+
+name: Go mod tidy
+on:
+  pull_request:
+  push:
+    branches:
+      - master
+
+jobs:
+  tidy:
+    uses: pion/.goassets/.github/workflows/tidy-check.reusable.yml@master
+    with:
+      go-version: '1.20' # auto-update/latest-go-version
diff --git a/.gitignore b/.gitignore
index f977e74..6e2f206 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,6 @@
+# SPDX-FileCopyrightText: 2023 The Pion community <https://pion.ly>
+# SPDX-License-Identifier: MIT
+
 ### JetBrains IDE ###
 #####################
 .idea/
diff --git a/.golangci.yml b/.golangci.yml
index 48696f1..4e3eddf 100644
--- a/.golangci.yml
+++ b/.golangci.yml
@@ -1,3 +1,6 @@
+# SPDX-FileCopyrightText: 2023 The Pion community <https://pion.ly>
+# SPDX-License-Identifier: MIT
+
 linters-settings:
   govet:
     check-shadowing: true
@@ -10,7 +13,14 @@ linters-settings:
       modules:
         - github.com/pkg/errors:
             recommendations:
-            - errors
+              - errors
+  forbidigo:
+    forbid:
+      - ^fmt.Print(f|ln)?$
+      - ^log.(Panic|Fatal|Print)(f|ln)?$
+      - ^os.Exit$
+      - ^panic$
+      - ^print(ln)?$
 
 linters:
   enable:
@@ -29,6 +39,7 @@ linters:
     - errorlint        # errorlint is a linter for that can be used to find code that will cause problems with the error wrapping scheme introduced in Go 1.13.
     - exhaustive       # check exhaustiveness of enum switch statements
     - exportloopref    # checks for pointers to enclosing loop variables
+    - forbidigo        # Forbids identifiers
     - forcetypeassert  # finds forced type assertions
     - gci              # Gci control golang package import order and make it always deterministic.
     - gochecknoglobals # Checks that no globals are present in Go code
@@ -73,7 +84,6 @@ linters:
     - containedctx     # containedctx is a linter that detects struct contained context.Context field
     - cyclop           # checks function and package cyclomatic complexity
     - exhaustivestruct # Checks if all struct's fields are initialized
-    - forbidigo        # Forbids identifiers
     - funlen           # Tool for detection of long functions
     - gocyclo          # Computes and checks the cyclomatic complexity of functions
     - godot            # Check if comments end in a period
@@ -105,12 +115,23 @@ issues:
     - path: _test\.go
       linters:
         - gocognit
+        - forbidigo
 
     # Allow complex main function in examples
     - path: examples
       text: "of func `main` is high"
       linters:
         - gocognit
+    
+    # Allow forbidden identifiers in examples
+    - path: examples
+      linters:
+        - forbidigo
+
+    # Allow forbidden identifiers in CLI commands
+    - path: cmd
+      linters:
+        - forbidigo
 
 run:
   skip-dirs-use-default: false
diff --git a/.goreleaser.yml b/.goreleaser.yml
index 2caa5fb..30093e9 100644
--- a/.goreleaser.yml
+++ b/.goreleaser.yml
@@ -1,2 +1,5 @@
+# SPDX-FileCopyrightText: 2023 The Pion community <https://pion.ly>
+# SPDX-License-Identifier: MIT
+
 builds:
 - skip: true
diff --git a/.reuse/dep5 b/.reuse/dep5
new file mode 100644
index 0000000..c8b3dfa
--- /dev/null
+++ b/.reuse/dep5
@@ -0,0 +1,11 @@
+Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
+Upstream-Name: Pion
+Source: https://github.com/pion/
+
+Files: README.md DESIGN.md **/README.md AUTHORS.txt renovate.json go.mod go.sum .eslintrc.json package.json examples/examples.json
+Copyright: 2023 The Pion community <https://pion.ly>
+License: MIT
+
+Files: testdata/fuzz/* **/testdata/fuzz/* api/*.txt
+Copyright: 2023 The Pion community <https://pion.ly>
+License: CC0-1.0
diff --git a/AUTHORS.txt b/AUTHORS.txt
index 2a17730..daca101 100644
--- a/AUTHORS.txt
+++ b/AUTHORS.txt
@@ -6,6 +6,7 @@
 adamroach <adam@nostrum.com>
 Adrian Cable <adrian.cable@gmail.com>
 Agniva De Sarker <agnivade@yahoo.co.in>
+Antoine Baché <antoine@tenten.app>
 Atsushi Watanabe <atsushi.w@ieee.org>
 backkem <mail@backkem.me>
 chenkaiC4 <chenkaic4@gmail.com>
@@ -20,8 +21,13 @@ Max Hawkins <maxhawkins@gmail.com>
 mission-liao <missionaryliao@gmail.com>
 Novel Corpse <romandafe94@gmail.com>
 OrlandoCo <luisorlando.co@gmail.com>
+Patryk <digitalix4@gmail.com>
+Patryk Rogalski <digitalix4@gmail.com>
 Sean DuBois <seaduboi@amazon.com>
 Sean DuBois <sean@siobud.com>
+SeongGyu Park <tawny.port@kakaoenterprise.com>
+Steffen <post@steffenvogel.de>
+Steffen Vogel <post@steffenvogel.de>
 Tobias Fridén <tobias.friden@gmail.com>
 Woodrow Douglass <wdouglass@carnegierobotics.com>
 Yutaka Takeda <yt0916@gmail.com>
diff --git a/DESIGN.md b/DESIGN.md
deleted file mode 100644
index 8742540..0000000
--- a/DESIGN.md
+++ /dev/null
@@ -1,20 +0,0 @@
-<h1 align="center">
-  Design
-</h1>
-
-### Portable
-Pion SRTP is written in Go and extremely portable. Anywhere Golang runs, Pion SRTP should work as well! Instead of dealing with complicated
-cross-compiling of multiple libraries, you now can run anywhere with one `go build`
-
-### Simple API
-The API is based on an io.ReadWriteCloser.
-
-### Readable
-If code comes from an RFC we try to make sure everything is commented with a link to the spec.
-This makes learning and debugging easier, this library was written to also serve as a guide for others.
-
-### Tested
-Every commit is tested via travis-ci Go provides fantastic facilities for testing, and more will be added as time goes on.
-
-### Shared libraries
-Every pion product is built using shared libraries, allowing others to review and reuse our libraries.
diff --git a/LICENSE b/LICENSE
index ab60297..491caf6 100644
--- a/LICENSE
+++ b/LICENSE
@@ -1,21 +1,9 @@
 MIT License
 
-Copyright (c) 2018 
+Copyright (c) 2023 The Pion community <https://pion.ly>
 
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
 
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
 
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-SOFTWARE.
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/LICENSES/MIT.txt b/LICENSES/MIT.txt
new file mode 100644
index 0000000..2071b23
--- /dev/null
+++ b/LICENSES/MIT.txt
@@ -0,0 +1,9 @@
+MIT License
+
+Copyright (c) <year> <copyright holders>
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/README.md b/README.md
index 55685b7..d0e94e7 100644
--- a/README.md
+++ b/README.md
@@ -9,28 +9,27 @@
   <a href="https://sourcegraph.com/github.com/pion/srtp?badge"><img src="https://sourcegraph.com/github.com/pion/srtp/-/badge.svg" alt="Sourcegraph Widget"></a>
   <a href="https://pion.ly/slack"><img src="https://img.shields.io/badge/join-us%20on%20slack-gray.svg?longCache=true&logo=slack&colorB=brightgreen" alt="Slack Widget"></a>
   <br>
-  <a href="https://travis-ci.org/pion/srtp"><img src="https://travis-ci.org/pion/srtp.svg?branch=master" alt="Build Status"></a>
-  <a href="https://pkg.go.dev/github.com/pion/srtp"><img src="https://godoc.org/github.com/pion/srtp?status.svg" alt="GoDoc"></a>
+  <img alt="GitHub Workflow Status" src="https://img.shields.io/github/actions/workflow/status/pion/srtp/test.yaml">
+  <a href="https://pkg.go.dev/github.com/pion/srtp"><img src="https://pkg.go.dev/badge/github.com/pion/srtp.svg" alt="Go Reference"></a>
   <a href="https://codecov.io/gh/pion/srtp"><img src="https://codecov.io/gh/pion/srtp/branch/master/graph/badge.svg" alt="Coverage Status"></a>
   <a href="https://goreportcard.com/report/github.com/pion/srtp"><img src="https://goreportcard.com/badge/github.com/pion/srtp" alt="Go Report Card"></a>
   <a href="LICENSE"><img src="https://img.shields.io/badge/License-MIT-yellow.svg" alt="License: MIT"></a>
 </p>
 <br>
 
-See [DESIGN.md](DESIGN.md) for an overview of features and future goals.
-
 ### Roadmap
 The library is used as a part of our WebRTC implementation. Please refer to that [roadmap](https://github.com/pion/webrtc/issues/9) to track our major milestones.
 
 ### Community
-Pion has an active community on the [Golang Slack](https://invite.slack.golangbridge.org/). Sign up and join the **#pion** channel for discussions and support. You can also use [Pion mailing list](https://groups.google.com/forum/#!forum/pion).
+Pion has an active community on the [Slack](https://pion.ly/slack).
 
-We are always looking to support **your projects**. Please reach out if you have something to build!
+Follow the [Pion Twitter](https://twitter.com/_pion) for project updates and important WebRTC news.
 
+We are always looking to support **your projects**. Please reach out if you have something to build!
 If you need commercial support or don't want to use public methods you can contact us at [team@pion.ly](mailto:team@pion.ly)
 
 ### Contributing
-Check out the **[contributing wiki](https://github.com/pion/webrtc/wiki/Contributing)** to join the group of amazing people making this project possible:
+Check out the [contributing wiki](https://github.com/pion/webrtc/wiki/Contributing) to join the group of amazing people making this project possible: [AUTHORS.txt](./AUTHORS.txt)
 
 ### License
 MIT License - see [LICENSE](LICENSE) for full text
diff --git a/codecov.yml b/codecov.yml
index 085200a..263e4d4 100644
--- a/codecov.yml
+++ b/codecov.yml
@@ -3,6 +3,8 @@
 #
 # It is automatically copied from https://github.com/pion/.goassets repository.
 #
+# SPDX-FileCopyrightText: 2023 The Pion community <https://pion.ly>
+# SPDX-License-Identifier: MIT
 
 coverage:
   status:
diff --git a/context.go b/context.go
index 438a51c..27da02c 100644
--- a/context.go
+++ b/context.go
@@ -1,3 +1,6 @@
+// SPDX-FileCopyrightText: 2023 The Pion community <https://pion.ly>
+// SPDX-License-Identifier: MIT
+
 package srtp
 
 import (
@@ -27,8 +30,8 @@ const (
 // Encrypt/Decrypt state for a single SRTP SSRC
 type srtpSSRCState struct {
 	ssrc                 uint32
-	index                uint64
 	rolloverHasProcessed bool
+	index                uint64
 	replayDetector       replaydetector.ReplayDetector
 }
 
@@ -85,7 +88,7 @@ func CreateContext(masterKey, masterSalt []byte, profile ProtectionProfile, opts
 	}
 
 	switch profile {
-	case ProtectionProfileAeadAes128Gcm:
+	case ProtectionProfileAeadAes128Gcm, ProtectionProfileAeadAes256Gcm:
 		c.cipher, err = newSrtpCipherAeadAesGcm(profile, masterKey, masterSalt)
 	case ProtectionProfileAes128CmHmacSha1_32, ProtectionProfileAes128CmHmacSha1_80:
 		c.cipher, err = newSrtpCipherAesCmHmacSha1(profile, masterKey, masterSalt)
diff --git a/context_test.go b/context_test.go
index b3fecea..60b078c 100644
--- a/context_test.go
+++ b/context_test.go
@@ -1,3 +1,6 @@
+// SPDX-FileCopyrightText: 2023 The Pion community <https://pion.ly>
+// SPDX-License-Identifier: MIT
+
 package srtp
 
 import (
diff --git a/crypto.go b/crypto.go
index 0625e91..9696e8f 100644
--- a/crypto.go
+++ b/crypto.go
@@ -1,3 +1,6 @@
+// SPDX-FileCopyrightText: 2023 The Pion community <https://pion.ly>
+// SPDX-License-Identifier: MIT
+
 package srtp
 
 import (
diff --git a/crypto_test.go b/crypto_test.go
index fe98e0f..6526be8 100644
--- a/crypto_test.go
+++ b/crypto_test.go
@@ -1,3 +1,6 @@
+// SPDX-FileCopyrightText: 2023 The Pion community <https://pion.ly>
+// SPDX-License-Identifier: MIT
+
 package srtp
 
 import (
diff --git a/debian/changelog b/debian/changelog
index 20459a1..ff34878 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+golang-github-pion-srtp.v2 (2.0.16-1) UNRELEASED; urgency=low
+
+  * New upstream release.
+
+ -- Debian Janitor <janitor@jelmer.uk>  Sun, 13 Aug 2023 05:23:08 -0000
+
 golang-github-pion-srtp.v2 (2.0.12-1) unstable; urgency=medium
 
   * New upstream version 2.0.12
diff --git a/errors.go b/errors.go
index db5b7db..5b1751d 100644
--- a/errors.go
+++ b/errors.go
@@ -1,3 +1,6 @@
+// SPDX-FileCopyrightText: 2023 The Pion community <https://pion.ly>
+// SPDX-License-Identifier: MIT
+
 package srtp
 
 import (
diff --git a/go.mod b/go.mod
index 976251c..062e74b 100644
--- a/go.mod
+++ b/go.mod
@@ -5,7 +5,7 @@ go 1.14
 require (
 	github.com/pion/logging v0.2.2
 	github.com/pion/rtcp v1.2.10
-	github.com/pion/rtp v1.7.13
-	github.com/pion/transport/v2 v2.0.0
-	github.com/stretchr/testify v1.8.1
+	github.com/pion/rtp v1.8.0
+	github.com/pion/transport/v2 v2.2.1
+	github.com/stretchr/testify v1.8.4
 )
diff --git a/go.sum b/go.sum
index 3e7d22e..be669a8 100644
--- a/go.sum
+++ b/go.sum
@@ -7,10 +7,10 @@ github.com/pion/randutil v0.1.0 h1:CFG1UdESneORglEsnimhUjf33Rwjubwj6xfiOXBa3mA=
 github.com/pion/randutil v0.1.0/go.mod h1:XcJrSMMbbMRhASFVOlj/5hQial/Y8oH/HVo7TBZq+j8=
 github.com/pion/rtcp v1.2.10 h1:nkr3uj+8Sp97zyItdN60tE/S6vk4al5CPRR6Gejsdjc=
 github.com/pion/rtcp v1.2.10/go.mod h1:ztfEwXZNLGyF1oQDttz/ZKIBaeeg/oWbRYqzBM9TL1I=
-github.com/pion/rtp v1.7.13 h1:qcHwlmtiI50t1XivvoawdCGTP4Uiypzfrsap+bijcoA=
-github.com/pion/rtp v1.7.13/go.mod h1:bDb5n+BFZxXx0Ea7E5qe+klMuqiBrP+w8XSjiWtCUko=
-github.com/pion/transport/v2 v2.0.0 h1:bsMYyqHCbkvHwj+eNCFBuxtlKndKfyGI2vaQmM3fIE4=
-github.com/pion/transport/v2 v2.0.0/go.mod h1:HS2MEBJTwD+1ZI2eSXSvHJx/HnzQqRy2/LXxt6eVMHc=
+github.com/pion/rtp v1.8.0 h1:SYD7040IR+NqrGBOc2GDU5iDjAR+0m5rnX/EWCUMNhw=
+github.com/pion/rtp v1.8.0/go.mod h1:pBGHaFt/yW7bf1jjWAoUjpSNoDnw98KTMg+jWWvziqU=
+github.com/pion/transport/v2 v2.2.1 h1:7qYnCBlpgSJNYMbLCKuSY9KbQdBFoETvPNETv0y4N7c=
+github.com/pion/transport/v2 v2.2.1/go.mod h1:cXXWavvCnFF6McHTft3DWS9iic2Mftcz1Aq29pGcU5g=
 github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
 github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
 github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
@@ -18,37 +18,44 @@ github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSS
 github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo=
 github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
 github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=
-github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKsk=
-github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4=
+github.com/stretchr/testify v1.8.3/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo=
+github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk=
+github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo=
 github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY=
 golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
 golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
 golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4=
+golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs=
 golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
 golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
 golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=
-golang.org/x/net v0.1.0 h1:hZ/3BUoy5aId7sCpA/Tc5lt8DkFgdVS2onTpJsZ/fl0=
-golang.org/x/net v0.1.0/go.mod h1:Cx3nUiGt4eDBEyega/BKRp+/AlGL8hYe7U9odMt2Cco=
+golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs=
+golang.org/x/net v0.9.0 h1:aWJ/m6xSmxWBx+V0XRHTlrYrPG56jKsLdTFmsSsCzOM=
+golang.org/x/net v0.9.0/go.mod h1:d48xBJpPfHeWQsugry2m+kC02ZBRGRgulfHnEXEuWns=
 golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
 golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
+golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
 golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
 golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
 golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
 golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
 golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
-golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
-golang.org/x/sys v0.2.0 h1:ljd4t30dBnAvMZaQCevtY0xLLD0A+bRZXbgLMLU1F/A=
-golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
+golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
+golang.org/x/sys v0.7.0 h1:3jlCCIQZPdOYu1h8BkNvLz8Kgwtae2cagcG/VamtZRU=
+golang.org/x/sys v0.7.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
 golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
 golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
-golang.org/x/term v0.1.0/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
+golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k=
+golang.org/x/term v0.7.0/go.mod h1:P32HKFT3hSsZrRxla30E9HqToFYAQPCMs/zFMBUFqPY=
 golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
 golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
 golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
-golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
+golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
+golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8=
 golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
 golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
 golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc=
+golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU=
 golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
 gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
 gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
diff --git a/key_derivation.go b/key_derivation.go
index 09bc58b..05f0f29 100644
--- a/key_derivation.go
+++ b/key_derivation.go
@@ -1,3 +1,6 @@
+// SPDX-FileCopyrightText: 2023 The Pion community <https://pion.ly>
+// SPDX-License-Identifier: MIT
+
 package srtp
 
 import (
@@ -19,7 +22,7 @@ func aesCmKeyDerivation(label byte, masterKey, masterSalt []byte, indexOverKdr i
 	nMasterKey := len(masterKey)
 	nMasterSalt := len(masterSalt)
 
-	prfIn := make([]byte, nMasterKey)
+	prfIn := make([]byte, 16)
 	copy(prfIn[:nMasterSalt], masterSalt)
 
 	prfIn[7] ^= label
@@ -32,8 +35,8 @@ func aesCmKeyDerivation(label byte, masterKey, masterSalt []byte, indexOverKdr i
 
 	out := make([]byte, ((outLen+nMasterKey)/nMasterKey)*nMasterKey)
 	var i uint16
-	for n := 0; n < outLen; n += nMasterKey {
-		binary.BigEndian.PutUint16(prfIn[nMasterKey-2:], i)
+	for n := 0; n < outLen; n += block.BlockSize() {
+		binary.BigEndian.PutUint16(prfIn[len(prfIn)-2:], i)
 		block.Encrypt(out[n:n+nMasterKey], prfIn)
 		i++
 	}
diff --git a/key_derivation_test.go b/key_derivation_test.go
index a2c7aa5..9995e32 100644
--- a/key_derivation_test.go
+++ b/key_derivation_test.go
@@ -1,3 +1,6 @@
+// SPDX-FileCopyrightText: 2023 The Pion community <https://pion.ly>
+// SPDX-License-Identifier: MIT
+
 package srtp
 
 import (
diff --git a/keying.go b/keying.go
index 82fd4d9..c5977c3 100644
--- a/keying.go
+++ b/keying.go
@@ -1,3 +1,6 @@
+// SPDX-FileCopyrightText: 2023 The Pion community <https://pion.ly>
+// SPDX-License-Identifier: MIT
+
 package srtp
 
 const labelExtractorDtlsSrtp = "EXTRACTOR-dtls_srtp"
diff --git a/keying_test.go b/keying_test.go
index 8226204..6071ebf 100644
--- a/keying_test.go
+++ b/keying_test.go
@@ -1,3 +1,6 @@
+// SPDX-FileCopyrightText: 2023 The Pion community <https://pion.ly>
+// SPDX-License-Identifier: MIT
+
 package srtp
 
 import (
@@ -11,7 +14,7 @@ type mockKeyingMaterialExporter struct {
 	exported []byte
 }
 
-func (m *mockKeyingMaterialExporter) ExportKeyingMaterial(label string, context []byte, length int) ([]byte, error) {
+func (m *mockKeyingMaterialExporter) ExportKeyingMaterial(label string, _ []byte, length int) ([]byte, error) {
 	if label != labelExtractorDtlsSrtp {
 		return nil, fmt.Errorf("%w: expected(%s) actual(%s)", errExporterWrongLabel, label, labelExtractorDtlsSrtp)
 	}
diff --git a/option.go b/option.go
index 84df19c..0c75096 100644
--- a/option.go
+++ b/option.go
@@ -1,3 +1,6 @@
+// SPDX-FileCopyrightText: 2023 The Pion community <https://pion.ly>
+// SPDX-License-Identifier: MIT
+
 package srtp
 
 import (
@@ -47,6 +50,22 @@ func SRTCPNoReplayProtection() ContextOption {
 	}
 }
 
+// SRTPReplayDetectorFactory sets custom SRTP replay detector.
+func SRTPReplayDetectorFactory(fn func() replaydetector.ReplayDetector) ContextOption { // nolint:revive
+	return func(c *Context) error {
+		c.newSRTPReplayDetector = fn
+		return nil
+	}
+}
+
+// SRTCPReplayDetectorFactory sets custom SRTCP replay detector.
+func SRTCPReplayDetectorFactory(fn func() replaydetector.ReplayDetector) ContextOption {
+	return func(c *Context) error {
+		c.newSRTCPReplayDetector = fn
+		return nil
+	}
+}
+
 type nopReplayDetector struct{}
 
 func (s *nopReplayDetector) Check(uint64) (func(), bool) {
diff --git a/protection_profile.go b/protection_profile.go
index 71d9ac5..c9b0fce 100644
--- a/protection_profile.go
+++ b/protection_profile.go
@@ -1,3 +1,6 @@
+// SPDX-FileCopyrightText: 2023 The Pion community <https://pion.ly>
+// SPDX-License-Identifier: MIT
+
 package srtp
 
 import "fmt"
@@ -11,12 +14,15 @@ const (
 	ProtectionProfileAes128CmHmacSha1_80 ProtectionProfile = 0x0001
 	ProtectionProfileAes128CmHmacSha1_32 ProtectionProfile = 0x0002
 	ProtectionProfileAeadAes128Gcm       ProtectionProfile = 0x0007
+	ProtectionProfileAeadAes256Gcm       ProtectionProfile = 0x0008
 )
 
 func (p ProtectionProfile) keyLen() (int, error) {
 	switch p {
 	case ProtectionProfileAes128CmHmacSha1_32, ProtectionProfileAes128CmHmacSha1_80, ProtectionProfileAeadAes128Gcm:
 		return 16, nil
+	case ProtectionProfileAeadAes256Gcm:
+		return 32, nil
 	default:
 		return 0, fmt.Errorf("%w: %#v", errNoSuchSRTPProfile, p)
 	}
@@ -26,7 +32,7 @@ func (p ProtectionProfile) saltLen() (int, error) {
 	switch p {
 	case ProtectionProfileAes128CmHmacSha1_32, ProtectionProfileAes128CmHmacSha1_80:
 		return 14, nil
-	case ProtectionProfileAeadAes128Gcm:
+	case ProtectionProfileAeadAes128Gcm, ProtectionProfileAeadAes256Gcm:
 		return 12, nil
 	default:
 		return 0, fmt.Errorf("%w: %#v", errNoSuchSRTPProfile, p)
@@ -39,7 +45,7 @@ func (p ProtectionProfile) rtpAuthTagLen() (int, error) {
 		return 10, nil
 	case ProtectionProfileAes128CmHmacSha1_32:
 		return 4, nil
-	case ProtectionProfileAeadAes128Gcm:
+	case ProtectionProfileAeadAes128Gcm, ProtectionProfileAeadAes256Gcm:
 		return 0, nil
 	default:
 		return 0, fmt.Errorf("%w: %#v", errNoSuchSRTPProfile, p)
@@ -50,7 +56,7 @@ func (p ProtectionProfile) rtcpAuthTagLen() (int, error) {
 	switch p {
 	case ProtectionProfileAes128CmHmacSha1_32, ProtectionProfileAes128CmHmacSha1_80:
 		return 10, nil
-	case ProtectionProfileAeadAes128Gcm:
+	case ProtectionProfileAeadAes128Gcm, ProtectionProfileAeadAes256Gcm:
 		return 0, nil
 	default:
 		return 0, fmt.Errorf("%w: %#v", errNoSuchSRTPProfile, p)
@@ -61,7 +67,7 @@ func (p ProtectionProfile) aeadAuthTagLen() (int, error) {
 	switch p {
 	case ProtectionProfileAes128CmHmacSha1_32, ProtectionProfileAes128CmHmacSha1_80:
 		return 0, nil
-	case ProtectionProfileAeadAes128Gcm:
+	case ProtectionProfileAeadAes128Gcm, ProtectionProfileAeadAes256Gcm:
 		return 16, nil
 	default:
 		return 0, fmt.Errorf("%w: %#v", errNoSuchSRTPProfile, p)
@@ -72,7 +78,7 @@ func (p ProtectionProfile) authKeyLen() (int, error) {
 	switch p {
 	case ProtectionProfileAes128CmHmacSha1_32, ProtectionProfileAes128CmHmacSha1_80:
 		return 20, nil
-	case ProtectionProfileAeadAes128Gcm:
+	case ProtectionProfileAeadAes128Gcm, ProtectionProfileAeadAes256Gcm:
 		return 0, nil
 	default:
 		return 0, fmt.Errorf("%w: %#v", errNoSuchSRTPProfile, p)
diff --git a/protection_profile_test.go b/protection_profile_test.go
index 7f1603c..b0edfd5 100644
--- a/protection_profile_test.go
+++ b/protection_profile_test.go
@@ -1,3 +1,6 @@
+// SPDX-FileCopyrightText: 2023 The Pion community <https://pion.ly>
+// SPDX-License-Identifier: MIT
+
 package srtp
 
 import (
diff --git a/session.go b/session.go
index f72dcda..2e1f4fe 100644
--- a/session.go
+++ b/session.go
@@ -1,3 +1,6 @@
+// SPDX-FileCopyrightText: 2023 The Pion community <https://pion.ly>
+// SPDX-License-Identifier: MIT
+
 package srtp
 
 import (
@@ -5,6 +8,7 @@ import (
 	"io"
 	"net"
 	"sync"
+	"time"
 
 	"github.com/pion/logging"
 	"github.com/pion/transport/v2/packetio"
@@ -21,7 +25,8 @@ type session struct {
 	localContext, remoteContext *Context
 	localOptions, remoteOptions []ContextOption
 
-	newStream chan readStream
+	newStream           chan readStream
+	acceptStreamTimeout time.Time
 
 	started chan interface{}
 	closed  chan interface{}
@@ -41,10 +46,11 @@ type session struct {
 // or directly pass the keys themselves.
 // After a Config is passed to a session it must not be modified.
 type Config struct {
-	Keys          SessionKeys
-	Profile       ProtectionProfile
-	BufferFactory func(packetType packetio.BufferPacketType, ssrc uint32) io.ReadWriteCloser
-	LoggerFactory logging.LoggerFactory
+	Keys                SessionKeys
+	Profile             ProtectionProfile
+	BufferFactory       func(packetType packetio.BufferPacketType, ssrc uint32) io.ReadWriteCloser
+	LoggerFactory       logging.LoggerFactory
+	AcceptStreamTimeout time.Time
 
 	// List of local/remote context options.
 	// ReplayProtection is enabled on remote context by default.
@@ -118,6 +124,10 @@ func (s *session) start(localMasterKey, localMasterSalt, remoteMasterKey, remote
 		return err
 	}
 
+	if err = s.nextConn.SetReadDeadline(s.acceptStreamTimeout); err != nil {
+		return err
+	}
+
 	go func() {
 		defer func() {
 			close(s.newStream)
diff --git a/session_srtcp.go b/session_srtcp.go
index 7e19b2a..13f1a95 100644
--- a/session_srtcp.go
+++ b/session_srtcp.go
@@ -1,3 +1,6 @@
+// SPDX-FileCopyrightText: 2023 The Pion community <https://pion.ly>
+// SPDX-License-Identifier: MIT
+
 package srtp
 
 import (
@@ -46,15 +49,16 @@ func NewSessionSRTCP(conn net.Conn, config *Config) (*SessionSRTCP, error) { //n
 
 	s := &SessionSRTCP{
 		session: session{
-			nextConn:      conn,
-			localOptions:  localOpts,
-			remoteOptions: remoteOpts,
-			readStreams:   map[uint32]readStream{},
-			newStream:     make(chan readStream),
-			started:       make(chan interface{}),
-			closed:        make(chan interface{}),
-			bufferFactory: config.BufferFactory,
-			log:           loggerFactory.NewLogger("srtp"),
+			nextConn:            conn,
+			localOptions:        localOpts,
+			remoteOptions:       remoteOpts,
+			readStreams:         map[uint32]readStream{},
+			newStream:           make(chan readStream),
+			acceptStreamTimeout: config.AcceptStreamTimeout,
+			started:             make(chan interface{}),
+			closed:              make(chan interface{}),
+			bufferFactory:       config.BufferFactory,
+			log:                 loggerFactory.NewLogger("srtp"),
 		},
 	}
 	s.writeStream = &WriteStreamSRTCP{s}
@@ -165,6 +169,9 @@ func (s *SessionSRTCP) decrypt(buf []byte) error {
 		if r == nil {
 			return nil // Session has been closed
 		} else if isNew {
+			if !s.session.acceptStreamTimeout.IsZero() {
+				_ = s.session.nextConn.SetReadDeadline(time.Time{})
+			}
 			s.session.newStream <- r // Notify AcceptStream
 		}
 
diff --git a/session_srtcp_test.go b/session_srtcp_test.go
index 4314011..d5dc8e6 100644
--- a/session_srtcp_test.go
+++ b/session_srtcp_test.go
@@ -1,3 +1,6 @@
+// SPDX-FileCopyrightText: 2023 The Pion community <https://pion.ly>
+// SPDX-License-Identifier: MIT
+
 package srtp
 
 import (
@@ -301,6 +304,42 @@ func TestSessionSRTCPReplayProtection(t *testing.T) {
 	}
 }
 
+// nolint: dupl
+func TestSessionSRTCPAcceptStreamTimeout(t *testing.T) {
+	lim := test.TimeOut(time.Second * 5)
+	defer lim.Stop()
+
+	report := test.CheckRoutines(t)
+	defer report()
+
+	pipe, _ := net.Pipe()
+	config := &Config{
+		Profile: ProtectionProfileAes128CmHmacSha1_80,
+		Keys: SessionKeys{
+			[]byte{0xE1, 0xF9, 0x7A, 0x0D, 0x3E, 0x01, 0x8B, 0xE0, 0xD6, 0x4F, 0xA3, 0x2C, 0x06, 0xDE, 0x41, 0x39},
+			[]byte{0x0E, 0xC6, 0x75, 0xAD, 0x49, 0x8A, 0xFE, 0xEB, 0xB6, 0x96, 0x0B, 0x3A, 0xAB, 0xE6},
+			[]byte{0xE1, 0xF9, 0x7A, 0x0D, 0x3E, 0x01, 0x8B, 0xE0, 0xD6, 0x4F, 0xA3, 0x2C, 0x06, 0xDE, 0x41, 0x39},
+			[]byte{0x0E, 0xC6, 0x75, 0xAD, 0x49, 0x8A, 0xFE, 0xEB, 0xB6, 0x96, 0x0B, 0x3A, 0xAB, 0xE6},
+		},
+		AcceptStreamTimeout: time.Now().Add(3 * time.Second),
+	}
+
+	newSession, err := NewSessionSRTCP(pipe, config)
+	if err != nil {
+		t.Fatal(err)
+	} else if newSession == nil {
+		t.Fatal("NewSessionSRTCP did not error, but returned nil session")
+	}
+
+	if _, _, err = newSession.AcceptStream(); err == nil || !errors.Is(err, errStreamAlreadyClosed) {
+		t.Fatal(err)
+	}
+
+	if err = newSession.Close(); err != nil {
+		t.Fatal(err)
+	}
+}
+
 func getSenderSSRC(t *testing.T, stream *ReadStreamSRTCP) (ssrc uint32, err error) {
 	authTagSize, err := ProtectionProfileAes128CmHmacSha1_80.rtcpAuthTagLen()
 	if err != nil {
diff --git a/session_srtp.go b/session_srtp.go
index b864bac..e07cbe2 100644
--- a/session_srtp.go
+++ b/session_srtp.go
@@ -1,3 +1,6 @@
+// SPDX-FileCopyrightText: 2023 The Pion community <https://pion.ly>
+// SPDX-License-Identifier: MIT
+
 package srtp
 
 import (
@@ -47,15 +50,16 @@ func NewSessionSRTP(conn net.Conn, config *Config) (*SessionSRTP, error) { //nol
 
 	s := &SessionSRTP{
 		session: session{
-			nextConn:      conn,
-			localOptions:  localOpts,
-			remoteOptions: remoteOpts,
-			readStreams:   map[uint32]readStream{},
-			newStream:     make(chan readStream),
-			started:       make(chan interface{}),
-			closed:        make(chan interface{}),
-			bufferFactory: config.BufferFactory,
-			log:           loggerFactory.NewLogger("srtp"),
+			nextConn:            conn,
+			localOptions:        localOpts,
+			remoteOptions:       remoteOpts,
+			readStreams:         map[uint32]readStream{},
+			newStream:           make(chan readStream),
+			acceptStreamTimeout: config.AcceptStreamTimeout,
+			started:             make(chan interface{}),
+			closed:              make(chan interface{}),
+			bufferFactory:       config.BufferFactory,
+			log:                 loggerFactory.NewLogger("srtp"),
 		},
 	}
 	s.writeStream = &WriteStreamSRTP{s}
@@ -171,6 +175,9 @@ func (s *SessionSRTP) decrypt(buf []byte) error {
 	if r == nil {
 		return nil // Session has been closed
 	} else if isNew {
+		if !s.session.acceptStreamTimeout.IsZero() {
+			_ = s.session.nextConn.SetReadDeadline(time.Time{})
+		}
 		s.session.newStream <- r // Notify AcceptStream
 	}
 
diff --git a/session_srtp_test.go b/session_srtp_test.go
index 1143c50..b9fa3bd 100644
--- a/session_srtp_test.go
+++ b/session_srtp_test.go
@@ -1,3 +1,6 @@
+// SPDX-FileCopyrightText: 2023 The Pion community <https://pion.ly>
+// SPDX-License-Identifier: MIT
+
 package srtp
 
 import (
@@ -355,6 +358,42 @@ func TestSessionSRTPReplayProtection(t *testing.T) {
 	}
 }
 
+// nolint: dupl
+func TestSessionSRTPAcceptStreamTimeout(t *testing.T) {
+	lim := test.TimeOut(time.Second * 5)
+	defer lim.Stop()
+
+	report := test.CheckRoutines(t)
+	defer report()
+
+	pipe, _ := net.Pipe()
+	config := &Config{
+		Profile: ProtectionProfileAes128CmHmacSha1_80,
+		Keys: SessionKeys{
+			[]byte{0xE1, 0xF9, 0x7A, 0x0D, 0x3E, 0x01, 0x8B, 0xE0, 0xD6, 0x4F, 0xA3, 0x2C, 0x06, 0xDE, 0x41, 0x39},
+			[]byte{0x0E, 0xC6, 0x75, 0xAD, 0x49, 0x8A, 0xFE, 0xEB, 0xB6, 0x96, 0x0B, 0x3A, 0xAB, 0xE6},
+			[]byte{0xE1, 0xF9, 0x7A, 0x0D, 0x3E, 0x01, 0x8B, 0xE0, 0xD6, 0x4F, 0xA3, 0x2C, 0x06, 0xDE, 0x41, 0x39},
+			[]byte{0x0E, 0xC6, 0x75, 0xAD, 0x49, 0x8A, 0xFE, 0xEB, 0xB6, 0x96, 0x0B, 0x3A, 0xAB, 0xE6},
+		},
+		AcceptStreamTimeout: time.Now().Add(3 * time.Second),
+	}
+
+	newSession, err := NewSessionSRTP(pipe, config)
+	if err != nil {
+		t.Fatal(err)
+	} else if newSession == nil {
+		t.Fatal("NewSessionSRTP did not error, but returned nil session")
+	}
+
+	if _, _, err = newSession.AcceptStream(); err == nil || !errors.Is(err, errStreamAlreadyClosed) {
+		t.Fatal(err)
+	}
+
+	if err = newSession.Close(); err != nil {
+		t.Fatal(err)
+	}
+}
+
 func assertPayloadSRTP(t *testing.T, stream *ReadStreamSRTP, headerSize int, expectedPayload []byte) (seq uint16, err error) {
 	readBuffer := make([]byte, headerSize+len(expectedPayload))
 	n, hdr, err := stream.ReadRTP(readBuffer)
diff --git a/srtcp.go b/srtcp.go
index 2812851..7fd0746 100644
--- a/srtcp.go
+++ b/srtcp.go
@@ -1,3 +1,6 @@
+// SPDX-FileCopyrightText: 2023 The Pion community <https://pion.ly>
+// SPDX-License-Identifier: MIT
+
 package srtp
 
 import (
diff --git a/srtcp_test.go b/srtcp_test.go
index 96133ab..79b37df 100644
--- a/srtcp_test.go
+++ b/srtcp_test.go
@@ -1,3 +1,6 @@
+// SPDX-FileCopyrightText: 2023 The Pion community <https://pion.ly>
+// SPDX-License-Identifier: MIT
+
 package srtp
 
 import (
@@ -7,6 +10,7 @@ import (
 	"testing"
 
 	"github.com/pion/rtcp"
+	"github.com/pion/transport/v2/replaydetector"
 	"github.com/stretchr/testify/assert"
 )
 
@@ -567,3 +571,26 @@ func TestRTCPMaxPackets(t *testing.T) {
 		})
 	}
 }
+
+func TestRTCPReplayDetectorFactory(t *testing.T) {
+	assert := assert.New(t)
+	testCase := rtcpTestCases()["AEAD_AES_128_GCM"]
+	data := testCase.packets[0]
+
+	var cntFactory int
+	decryptContext, err := CreateContext(
+		testCase.masterKey, testCase.masterSalt, testCase.algo,
+		SRTCPReplayDetectorFactory(func() replaydetector.ReplayDetector {
+			cntFactory++
+			return &nopReplayDetector{}
+		}),
+	)
+	if err != nil {
+		t.Fatal(err)
+	}
+
+	if _, err := decryptContext.DecryptRTCP(nil, data.encrypted, nil); err != nil {
+		t.Fatal(err)
+	}
+	assert.Equal(1, cntFactory)
+}
diff --git a/srtp.go b/srtp.go
index c8ad8a5..42c71be 100644
--- a/srtp.go
+++ b/srtp.go
@@ -1,3 +1,6 @@
+// SPDX-FileCopyrightText: 2023 The Pion community <https://pion.ly>
+// SPDX-License-Identifier: MIT
+
 // Package srtp implements Secure Real-time Transport Protocol
 package srtp
 
diff --git a/srtp_cipher.go b/srtp_cipher.go
index c272310..db50147 100644
--- a/srtp_cipher.go
+++ b/srtp_cipher.go
@@ -1,3 +1,6 @@
+// SPDX-FileCopyrightText: 2023 The Pion community <https://pion.ly>
+// SPDX-License-Identifier: MIT
+
 package srtp
 
 import "github.com/pion/rtp"
diff --git a/srtp_cipher_aead_aes_gcm.go b/srtp_cipher_aead_aes_gcm.go
index 110b80a..90643d9 100644
--- a/srtp_cipher_aead_aes_gcm.go
+++ b/srtp_cipher_aead_aes_gcm.go
@@ -1,3 +1,6 @@
+// SPDX-FileCopyrightText: 2023 The Pion community <https://pion.ly>
+// SPDX-License-Identifier: MIT
+
 package srtp
 
 import (
diff --git a/srtp_cipher_aead_aes_gcm_test.go b/srtp_cipher_aead_aes_gcm_test.go
index 6c1c603..90fd88c 100644
--- a/srtp_cipher_aead_aes_gcm_test.go
+++ b/srtp_cipher_aead_aes_gcm_test.go
@@ -1,3 +1,6 @@
+// SPDX-FileCopyrightText: 2023 The Pion community <https://pion.ly>
+// SPDX-License-Identifier: MIT
+
 package srtp
 
 import (
@@ -6,7 +9,7 @@ import (
 	"github.com/stretchr/testify/assert"
 )
 
-func TestSrtpCipherAedAesGcm(t *testing.T) {
+func TestSrtpCipherAedAes128Gcm(t *testing.T) {
 	decryptedRTPPacket := []byte{
 		0x80, 0x0f, 0x12, 0x34, 0xde, 0xca, 0xfb, 0xad,
 		0xca, 0xfe, 0xba, 0xbe, 0xab, 0xab, 0xab, 0xab,
@@ -82,3 +85,80 @@ func TestSrtpCipherAedAesGcm(t *testing.T) {
 		})
 	})
 }
+
+func TestSrtpCipherAedAes256Gcm(t *testing.T) {
+	decryptedRTPPacket := []byte{
+		0x80, 0x0f, 0x12, 0x34, 0xde, 0xca, 0xfb, 0xad,
+		0xca, 0xfe, 0xba, 0xbe, 0xab, 0xab, 0xab, 0xab,
+		0xab, 0xab, 0xab, 0xab, 0xab, 0xab, 0xab, 0xab,
+		0xab, 0xab, 0xab, 0xab,
+	}
+	encryptedRTPPacket := []byte{
+		0x80, 0xf, 0x12, 0x34, 0xde, 0xca, 0xfb, 0xad,
+		0xca, 0xfe, 0xba, 0xbe, 0xaf, 0x49, 0x96, 0x8f,
+		0x7e, 0x9c, 0x43, 0xf8, 0x01, 0xdd, 0x0c, 0x84,
+		0x8b, 0x1e, 0xc9, 0xb0, 0x29, 0xcd, 0xf8, 0x5c,
+		0xb7, 0x9a, 0x2f, 0x95, 0x60, 0xd4, 0x69, 0x75,
+		0x98, 0x50, 0x77, 0x25,
+	}
+	decryptedRtcpPacket := []byte{
+		0x81, 0xc8, 0x00, 0x0b, 0xca, 0xfe, 0xba, 0xbe,
+		0xab, 0xab, 0xab, 0xab, 0xab, 0xab, 0xab, 0xab,
+		0xab, 0xab, 0xab, 0xab, 0xab, 0xab, 0xab, 0xab,
+	}
+	encryptedRtcpPacket := []byte{
+		0x81, 0xc8, 0x00, 0x0b, 0xca, 0xfe, 0xba, 0xbe,
+		0x98, 0x22, 0xba, 0x22, 0x96, 0x1c, 0x31, 0x48,
+		0xe7, 0xb7, 0xec, 0x4f, 0x09, 0xf4, 0x26, 0xdc,
+		0xf6, 0xb5, 0x9a, 0x75, 0xad, 0xec, 0x74, 0xfd,
+		0xb9, 0x51, 0xb6, 0x66, 0x84, 0x24, 0xd4, 0xe2,
+		0x80, 0x00, 0x00, 0x01,
+	}
+
+	masterKey := []byte{0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f}
+	masterSalt := []byte{0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7, 0xa8, 0xa9, 0xaa, 0xab}
+
+	t.Run("Encrypt RTP", func(t *testing.T) {
+		ctx, err := CreateContext(masterKey, masterSalt, ProtectionProfileAeadAes256Gcm)
+		assert.NoError(t, err)
+
+		t.Run("New Allocation", func(t *testing.T) {
+			actualEncrypted, err := ctx.EncryptRTP(nil, decryptedRTPPacket, nil)
+			assert.NoError(t, err)
+			assert.Equal(t, encryptedRTPPacket, actualEncrypted)
+		})
+	})
+
+	t.Run("Decrypt RTP", func(t *testing.T) {
+		ctx, err := CreateContext(masterKey, masterSalt, ProtectionProfileAeadAes256Gcm)
+		assert.NoError(t, err)
+
+		t.Run("New Allocation", func(t *testing.T) {
+			actualDecrypted, err := ctx.DecryptRTP(nil, encryptedRTPPacket, nil)
+			assert.NoError(t, err)
+			assert.Equal(t, decryptedRTPPacket, actualDecrypted)
+		})
+	})
+
+	t.Run("Encrypt RTCP", func(t *testing.T) {
+		ctx, err := CreateContext(masterKey, masterSalt, ProtectionProfileAeadAes256Gcm)
+		assert.NoError(t, err)
+
+		t.Run("New Allocation", func(t *testing.T) {
+			actualEncrypted, err := ctx.EncryptRTCP(nil, decryptedRtcpPacket, nil)
+			assert.NoError(t, err)
+			assert.Equal(t, encryptedRtcpPacket, actualEncrypted)
+		})
+	})
+
+	t.Run("Decrypt RTCP", func(t *testing.T) {
+		ctx, err := CreateContext(masterKey, masterSalt, ProtectionProfileAeadAes256Gcm)
+		assert.NoError(t, err)
+
+		t.Run("New Allocation", func(t *testing.T) {
+			actualDecrypted, err := ctx.DecryptRTCP(nil, encryptedRtcpPacket, nil)
+			assert.NoError(t, err)
+			assert.Equal(t, decryptedRtcpPacket, actualDecrypted)
+		})
+	})
+}
diff --git a/srtp_cipher_aes_cm_hmac_sha1.go b/srtp_cipher_aes_cm_hmac_sha1.go
index 0e3af50..d56e6af 100644
--- a/srtp_cipher_aes_cm_hmac_sha1.go
+++ b/srtp_cipher_aes_cm_hmac_sha1.go
@@ -1,3 +1,6 @@
+// SPDX-FileCopyrightText: 2023 The Pion community <https://pion.ly>
+// SPDX-License-Identifier: MIT
+
 package srtp
 
 import ( //nolint:gci
diff --git a/srtp_test.go b/srtp_test.go
index e239614..f5cfb3f 100644
--- a/srtp_test.go
+++ b/srtp_test.go
@@ -1,3 +1,6 @@
+// SPDX-FileCopyrightText: 2023 The Pion community <https://pion.ly>
+// SPDX-License-Identifier: MIT
+
 package srtp
 
 import (
@@ -6,6 +9,7 @@ import (
 	"testing"
 
 	"github.com/pion/rtp"
+	"github.com/pion/transport/v2/replaydetector"
 	"github.com/stretchr/testify/assert"
 )
 
@@ -459,6 +463,37 @@ func TestRTPReplayProtection(t *testing.T) {
 	t.Run("GCM", func(t *testing.T) { testRTPReplayProtection(t, profileGCM) })
 }
 
+func TestRTPReplayDetectorFactory(t *testing.T) {
+	assert := assert.New(t)
+	profile := profileCTR
+	data := rtpTestCases()[0]
+
+	var cntFactory int
+	decryptContext, err := buildTestContext(
+		profile, SRTPReplayDetectorFactory(func() replaydetector.ReplayDetector {
+			cntFactory++
+			return &nopReplayDetector{}
+		}),
+	)
+	if err != nil {
+		t.Fatal(err)
+	}
+
+	pkt := &rtp.Packet{
+		Payload: data.encrypted(profile),
+		Header:  rtp.Header{SequenceNumber: data.sequenceNumber},
+	}
+	in, err := pkt.Marshal()
+	if err != nil {
+		t.Fatal(err)
+	}
+
+	if _, err := decryptContext.DecryptRTP(nil, in, nil); err != nil {
+		t.Fatal(err)
+	}
+	assert.Equal(1, cntFactory)
+}
+
 func benchmarkEncryptRTP(b *testing.B, profile ProtectionProfile, size int) {
 	encryptContext, err := buildTestContext(profile)
 	if err != nil {
diff --git a/stream.go b/stream.go
index 7b7a0cf..5f9c58a 100644
--- a/stream.go
+++ b/stream.go
@@ -1,3 +1,6 @@
+// SPDX-FileCopyrightText: 2023 The Pion community <https://pion.ly>
+// SPDX-License-Identifier: MIT
+
 package srtp
 
 type readStream interface {
diff --git a/stream_srtcp.go b/stream_srtcp.go
index 3e0b9ac..08d36dc 100644
--- a/stream_srtcp.go
+++ b/stream_srtcp.go
@@ -1,3 +1,6 @@
+// SPDX-FileCopyrightText: 2023 The Pion community <https://pion.ly>
+// SPDX-License-Identifier: MIT
+
 package srtp
 
 import (
@@ -17,11 +20,11 @@ const srtcpBufferSize = 100 * 1000
 type ReadStreamSRTCP struct {
 	mu sync.Mutex
 
-	isInited bool
 	isClosed chan bool
 
-	session *SessionSRTCP
-	ssrc    uint32
+	session  *SessionSRTCP
+	ssrc     uint32
+	isInited bool
 
 	buffer io.ReadWriteCloser
 }
diff --git a/stream_srtp.go b/stream_srtp.go
index 284f88e..8589700 100644
--- a/stream_srtp.go
+++ b/stream_srtp.go
@@ -1,3 +1,6 @@
+// SPDX-FileCopyrightText: 2023 The Pion community <https://pion.ly>
+// SPDX-License-Identifier: MIT
+
 package srtp
 
 import (
@@ -17,11 +20,11 @@ const srtpBufferSize = 1000 * 1000
 type ReadStreamSRTP struct {
 	mu sync.Mutex
 
-	isInited bool
 	isClosed chan bool
 
-	session *SessionSRTP
-	ssrc    uint32
+	session  *SessionSRTP
+	ssrc     uint32
+	isInited bool
 
 	buffer io.ReadWriteCloser
 }
diff --git a/stream_srtp_test.go b/stream_srtp_test.go
index 3888f8a..755c1c4 100644
--- a/stream_srtp_test.go
+++ b/stream_srtp_test.go
@@ -1,3 +1,6 @@
+// SPDX-FileCopyrightText: 2023 The Pion community <https://pion.ly>
+// SPDX-License-Identifier: MIT
+
 package srtp
 
 import (
@@ -14,15 +17,15 @@ import (
 
 type noopConn struct{ closed chan struct{} }
 
-func newNoopConn() *noopConn                           { return &noopConn{closed: make(chan struct{})} }
-func (c *noopConn) Read(b []byte) (n int, err error)   { <-c.closed; return 0, io.EOF }
-func (c *noopConn) Write(b []byte) (n int, err error)  { return len(b), nil }
-func (c *noopConn) Close() error                       { close(c.closed); return nil }
-func (c *noopConn) LocalAddr() net.Addr                { return nil }
-func (c *noopConn) RemoteAddr() net.Addr               { return nil }
-func (c *noopConn) SetDeadline(t time.Time) error      { return nil }
-func (c *noopConn) SetReadDeadline(t time.Time) error  { return nil }
-func (c *noopConn) SetWriteDeadline(t time.Time) error { return nil }
+func newNoopConn() *noopConn                          { return &noopConn{closed: make(chan struct{})} }
+func (c *noopConn) Read([]byte) (n int, err error)    { <-c.closed; return 0, io.EOF }
+func (c *noopConn) Write(b []byte) (n int, err error) { return len(b), nil }
+func (c *noopConn) Close() error                      { close(c.closed); return nil }
+func (c *noopConn) LocalAddr() net.Addr               { return nil }
+func (c *noopConn) RemoteAddr() net.Addr              { return nil }
+func (c *noopConn) SetDeadline(time.Time) error       { return nil }
+func (c *noopConn) SetReadDeadline(time.Time) error   { return nil }
+func (c *noopConn) SetWriteDeadline(time.Time) error  { return nil }
 
 func TestBufferFactory(t *testing.T) {
 	wg := sync.WaitGroup{}
diff --git a/util.go b/util.go
index 1ae34a6..792175d 100644
--- a/util.go
+++ b/util.go
@@ -1,3 +1,6 @@
+// SPDX-FileCopyrightText: 2023 The Pion community <https://pion.ly>
+// SPDX-License-Identifier: MIT
+
 package srtp
 
 import "bytes"

More details

Full run details