@exact-realty/rfc8188
Advanced tools
Comparing version 1.0.0 to 1.0.1
@@ -10,2 +10,3 @@ import type { TEncoding } from './encodings.js'; | ||
* based on the provided key ID. | ||
* @param maxRecordSize - The maximum record size allowed. | ||
* @returns A readable stream containing the decrypted data (plaintext). | ||
@@ -15,4 +16,4 @@ * @throws Throws if the record size is invalid or the decrypted data are | ||
*/ | ||
declare const decrypt: (encoding: Readonly<TEncoding>, data: Readonly<ReadableStream<Readonly<BufferSource>>>, lookupIKM: (keyId: ArrayBufferLike) => ArrayBufferLike | Promise<ArrayBufferLike>) => ReadableStream<ArrayBufferLike>; | ||
declare const decrypt: (encoding: Readonly<TEncoding>, data: Readonly<ReadableStream<Readonly<BufferSource>>>, lookupIKM: (keyId: ArrayBufferLike) => ArrayBufferLike | Promise<ArrayBufferLike>, maxRecordSize?: number | null | undefined) => ReadableStream<ArrayBufferLike>; | ||
export default decrypt; | ||
//# sourceMappingURL=decrypt.d.ts.map |
{ | ||
"name": "@exact-realty/rfc8188", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "An implementation of RFC 8188 (encrypted content-encoding for HTTP)", | ||
"type": "module", | ||
"main": "dist/index.js", | ||
"main": "dist/index.cjs", | ||
"module": "./dist/index.mjs", | ||
@@ -16,3 +16,3 @@ "exports": { | ||
"types": "./dist/index.d.ts", | ||
"default": "./dist/index.js" | ||
"default": "./dist/index.cjs" | ||
} | ||
@@ -27,3 +27,3 @@ }, | ||
"types": "./dist/exports/decrypt.d.ts", | ||
"default": "./dist/decrypt.js" | ||
"default": "./dist/decrypt.cjs" | ||
} | ||
@@ -38,3 +38,3 @@ }, | ||
"types": "./dist/exports/encodings.d.ts", | ||
"default": "./dist/encodings.js" | ||
"default": "./dist/encodings.cjs" | ||
} | ||
@@ -49,3 +49,3 @@ }, | ||
"types": "./dist/exports/encrypt.d.ts", | ||
"default": "./dist/encrypt.js" | ||
"default": "./dist/encrypt.cjs" | ||
} | ||
@@ -89,3 +89,3 @@ } | ||
"license": "ISC", | ||
"keywords": [] | ||
"keywords": ["rfc8188", "aes128gcm"] | ||
} |
@@ -41,2 +41,9 @@ 🔒 **RFC 8188 Encrypted Content-Encoding for HTTP in TypeScript** | ||
// Maximum permissible record size when decrypting. Because the decrypted data | ||
// are buffered until a record is full, not limiting it can result in a very | ||
// large memory allocation (4 GiB) depending on the incoming data. | ||
// If this parameter is not provided, no limit is used. Otherwise, incoming data | ||
// claiming to have records larger than this value will be rejected with. | ||
const maxRecordSize = Infinity; | ||
// Provide a function to lookup Initial Keying Material (IKM) | ||
@@ -56,2 +63,3 @@ const lookupIKM = async (keyId) => { | ||
lookupIKM, | ||
maxRecordSize, // optional | ||
); | ||
@@ -91,3 +99,3 @@ | ||
IKM, | ||
salt, | ||
salt, // optional | ||
); | ||
@@ -94,0 +102,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
38522
173
113