We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5f9bd88 commit eadc196Copy full SHA for eadc196
2 files changed
CHANGELOG.md
@@ -1,5 +1,10 @@
1
# @digitalbazaar/http-digest-header Changelog
2
3
+## 2.2.1 - 2025-10-dd
4
+
5
+### Fixed
6
+- Prevent making an unnecessary copy when encoding bytes.
7
8
## 2.2.0 - 2025-10-08
9
10
### Changed
lib/util.js
@@ -2,9 +2,11 @@
* Copyright (c) 2021-2025 Digital Bazaar, Inc. All rights reserved.
*/
export function base64Encode(bytes) {
- return Buffer.from(bytes).toString('base64');
+ return Buffer.from(bytes.buffer, bytes.offset, bytes.length)
+ .toString('base64');
}
export function base64urlEncode(bytes) {
- return Buffer.from(bytes).toString('base64url');
11
+ .toString('base64url');
12
0 commit comments