Skip to content

Commit b4cca21

Browse files
committed
change interface to return material,not nested material
1 parent 2d3d294 commit b4cca21

File tree

13 files changed

+55
-64
lines changed

13 files changed

+55
-64
lines changed

modules/cache-material/src/caching_cryptographic_materials_decorators.ts

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@
1616
import {
1717
GetEncryptionMaterials, // eslint-disable-line no-unused-vars
1818
GetDecryptMaterials, // eslint-disable-line no-unused-vars
19-
DecryptionResponse, // eslint-disable-line no-unused-vars
19+
DecryptionMaterial, // eslint-disable-line no-unused-vars
2020
SupportedAlgorithmSuites, // eslint-disable-line no-unused-vars
2121
EncryptionRequest, // eslint-disable-line no-unused-vars
22-
EncryptionResponse, // eslint-disable-line no-unused-vars
22+
EncryptionMaterial, // eslint-disable-line no-unused-vars
2323
MaterialsManager, // eslint-disable-line no-unused-vars
2424
DecryptionRequest, // eslint-disable-line no-unused-vars
2525
needs,
@@ -69,7 +69,7 @@ export function getEncryptionMaterials<S extends SupportedAlgorithmSuites> (
6969
return async function getEncryptionMaterials (
7070
this: CachingMaterialsManager<S>,
7171
request: EncryptionRequest<S>
72-
): Promise<EncryptionResponse<S>> {
72+
): Promise<EncryptionMaterial<S>> {
7373
const { suite, encryptionContext, frameLength, plaintextLength } = request
7474
/* Check for early return (Postcondition): If I can not cache the EncryptionResponse, do not even look. */
7575
if ((suite && !suite.cacheSafe) || typeof plaintextLength !== 'number' || plaintextLength < 0) {
@@ -95,7 +95,7 @@ export function getEncryptionMaterials<S extends SupportedAlgorithmSuites> (
9595
.getEncryptionMaterials({ suite, encryptionContext, frameLength })
9696

9797
/* Check for early return (Postcondition): If I can not cache the EncryptionResponse, just return it. */
98-
if (!response.material.suite.cacheSafe) return response
98+
if (!response.suite.cacheSafe) return response
9999

100100
/* It is possible for an entry to exceed limits immediately.
101101
* The simplest case is to need to encrypt more than then maxBytesEncrypted.
@@ -122,7 +122,7 @@ export function decryptMaterials<S extends SupportedAlgorithmSuites> (
122122
return async function decryptMaterials (
123123
this: CachingMaterialsManager<S>,
124124
request: DecryptionRequest<S>
125-
): Promise<DecryptionResponse<S>> {
125+
): Promise<DecryptionMaterial<S>> {
126126
const { suite } = request
127127
/* Check for early return (Postcondition): If I can not cache the DecryptionResponse, do not even look. */
128128
if (!suite.cacheSafe) {
@@ -166,14 +166,13 @@ export function cacheEntryHasExceededLimits<S extends SupportedAlgorithmSuites>
166166
* Because when the Encryption SDK is done with material, it will zero it out.
167167
* Plucking off the material and cloning just that and then returning the rest of the response
168168
* can just be handled in one place.
169-
* @param response EncryptionResponse|DecryptionResponse
169+
* @param material EncryptionResponse|DecryptionResponse
170170
* @return EncryptionResponse|DecryptionResponse
171171
*/
172-
function cloneResponse<S extends SupportedAlgorithmSuites, R extends EncryptionResponse<S>|DecryptionResponse<S>> (
173-
response: R
174-
): R {
175-
const { material } = response
176-
return { ...response, material: cloneMaterial(material) }
172+
function cloneResponse<S extends SupportedAlgorithmSuites, M extends EncryptionMaterial<S>|DecryptionMaterial<S>> (
173+
material: M
174+
): M {
175+
return cloneMaterial(material)
177176
}
178177

179178
export interface CachingMaterialsManagerInput<S extends SupportedAlgorithmSuites> extends Readonly<{

modules/cache-material/src/cryptographic_materials_cache.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,21 +14,21 @@
1414
*/
1515

1616
import {
17-
EncryptionResponse, // eslint-disable-line no-unused-vars
18-
DecryptionResponse, // eslint-disable-line no-unused-vars
17+
EncryptionMaterial, // eslint-disable-line no-unused-vars
18+
DecryptionMaterial, // eslint-disable-line no-unused-vars
1919
SupportedAlgorithmSuites // eslint-disable-line no-unused-vars
2020
} from '@aws-crypto/material-management'
2121

2222
export interface CryptographicMaterialsCache<S extends SupportedAlgorithmSuites> {
2323
putEncryptionResponse(
2424
key: string,
25-
response: EncryptionResponse<S>,
25+
response: EncryptionMaterial<S>,
2626
plaintextLength: number,
2727
maxAge?: number
2828
): void
2929
putDecryptionResponse(
3030
key: string,
31-
response: DecryptionResponse<S>,
31+
response: DecryptionMaterial<S>,
3232
maxAge?: number
3333
): void
3434
getEncryptionResponse(key: string, plaintextLength: number): EncryptionResponseEntry<S>|false
@@ -37,16 +37,16 @@ export interface CryptographicMaterialsCache<S extends SupportedAlgorithmSuites>
3737
}
3838

3939
export interface Entry<S extends SupportedAlgorithmSuites> {
40-
readonly response: EncryptionResponse<S>|DecryptionResponse<S>
40+
response: EncryptionMaterial<S>|DecryptionMaterial<S>
4141
bytesEncrypted: number
4242
messagesEncrypted: number
4343
readonly now: number
4444
}
4545

4646
export interface EncryptionResponseEntry<S extends SupportedAlgorithmSuites> extends Entry<S> {
47-
readonly response: EncryptionResponse<S>
47+
readonly response: EncryptionMaterial<S>
4848
}
4949

5050
export interface DecryptionResponseEntry<S extends SupportedAlgorithmSuites> extends Entry<S> {
51-
readonly response: DecryptionResponse<S>
51+
readonly response: DecryptionMaterial<S>
5252
}

modules/cache-material/src/get_local_cryptographic_materials_cache.ts

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@
1515

1616
import LRU from 'lru-cache'
1717
import {
18-
EncryptionResponse, // eslint-disable-line no-unused-vars
19-
DecryptionResponse, // eslint-disable-line no-unused-vars
18+
EncryptionMaterial, // eslint-disable-line no-unused-vars
19+
DecryptionMaterial, // eslint-disable-line no-unused-vars
2020
SupportedAlgorithmSuites, // eslint-disable-line no-unused-vars
2121
needs,
2222
isEncryptionMaterial,
@@ -38,7 +38,7 @@ export function getLocalCryptographicMaterialsCache<S extends SupportedAlgorithm
3838
max: maxSize,
3939
dispose (_key, value) {
4040
/* Zero out the unencrypted dataKey, when the material is removed from the cache. */
41-
value.response.material.zeroUnencryptedDataKey()
41+
value.response.zeroUnencryptedDataKey()
4242
}
4343
})
4444

@@ -73,18 +73,18 @@ export function getLocalCryptographicMaterialsCache<S extends SupportedAlgorithm
7373
return {
7474
putEncryptionResponse (
7575
key: string,
76-
response: EncryptionResponse<S>,
76+
material: EncryptionMaterial<S>,
7777
plaintextLength: number,
7878
maxAge?: number
7979
) {
8080
/* Precondition: putEncryptionResponse plaintextLength can not be negative. */
8181
needs(plaintextLength >= 0, 'Malformed plaintextLength')
8282
/* Precondition: Only cache EncryptionMaterial. */
83-
needs(isEncryptionMaterial(response.material), 'Malformed response.')
83+
needs(isEncryptionMaterial(material), 'Malformed response.')
8484
/* Precondition: Only cache EncryptionMaterial that is cacheSafe. */
85-
needs(response.material.suite.cacheSafe, 'Can not cache non-cache safe material')
85+
needs(material.suite.cacheSafe, 'Can not cache non-cache safe material')
8686
const entry = Object.seal({
87-
response: Object.freeze(response),
87+
response: material,
8888
bytesEncrypted: plaintextLength,
8989
messagesEncrypted: 1,
9090
now: Date.now()
@@ -94,15 +94,15 @@ export function getLocalCryptographicMaterialsCache<S extends SupportedAlgorithm
9494
},
9595
putDecryptionResponse (
9696
key: string,
97-
response: DecryptionResponse<S>,
97+
material: DecryptionMaterial<S>,
9898
maxAge?: number
9999
) {
100100
/* Precondition: Only cache DecryptionMaterial. */
101-
needs(isDecryptionMaterial(response.material), 'Malformed response.')
101+
needs(isDecryptionMaterial(material), 'Malformed response.')
102102
/* Precondition: Only cache DecryptionMaterial that is cacheSafe. */
103-
needs(response.material.suite.cacheSafe, 'Can not cache non-cache safe material')
103+
needs(material.suite.cacheSafe, 'Can not cache non-cache safe material')
104104
const entry = Object.seal({
105-
response: Object.freeze(response),
105+
response: material,
106106
bytesEncrypted: 0,
107107
messagesEncrypted: 0,
108108
now: Date.now()
@@ -117,7 +117,7 @@ export function getLocalCryptographicMaterialsCache<S extends SupportedAlgorithm
117117
/* Check for early return (Postcondition): If this key does not have an EncryptionMaterial, return false. */
118118
if (!entry) return false
119119
/* Postcondition: Only return EncryptionMaterial. */
120-
needs(isEncryptionMaterial(entry.response.material), 'Malformed response.')
120+
needs(isEncryptionMaterial(entry.response), 'Malformed response.')
121121

122122
entry.bytesEncrypted += plaintextLength
123123
entry.messagesEncrypted += 1
@@ -129,7 +129,7 @@ export function getLocalCryptographicMaterialsCache<S extends SupportedAlgorithm
129129
/* Check for early return (Postcondition): If this key does not have a DecryptionMaterial, return false. */
130130
if (!entry) return false
131131
/* Postcondition: Only return DecryptionMaterial. */
132-
needs(isDecryptionMaterial(entry.response.material), 'Malformed response.')
132+
needs(isDecryptionMaterial(entry.response), 'Malformed response.')
133133

134134
return <DecryptionResponseEntry<S>>entry
135135
},

modules/decrypt-browser/src/decrypt.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ export async function decrypt (
5959
const { encryptionContext, encryptedDataKeys, suiteId, messageId } = messageHeader
6060
const suite = new WebCryptoAlgorithmSuite(suiteId)
6161

62-
const { material } = await cmm.decryptMaterials({ suite, encryptionContext, encryptedDataKeys })
62+
const material = await cmm.decryptMaterials({ suite, encryptionContext, encryptedDataKeys })
6363
const { kdfGetSubtleDecrypt, subtleVerify, dispose } = await getDecryptionHelper(material)
6464
const info = kdfInfo(suiteId, messageId)
6565
const getSubtleDecrypt = kdfGetSubtleDecrypt(info)

modules/decrypt-node/src/parse_header_stream.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ export class ParseHeaderStream extends PortableTransformWithType {
8686

8787
this.materialsManager
8888
.decryptMaterials({ suite, encryptionContext, encryptedDataKeys })
89-
.then(({ material }) => {
89+
.then((material) => {
9090
this._headerState.buffer = Buffer.alloc(0) // clear the Buffer...
9191

9292
const { kdfGetDecipher, getVerify, dispose } = getDecryptionHelper(material)

modules/encrypt-browser/src/encrypt.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ export async function encrypt (
8484
plaintextLength
8585
}
8686

87-
const { material } = await cmm.getEncryptionMaterials(encryptionRequest)
87+
const material = await cmm.getEncryptionMaterials(encryptionRequest)
8888
const { kdfGetSubtleEncrypt, subtleSign, dispose } = await getEncryptHelper(material)
8989

9090
const messageId = await backend.randomValues(MESSAGE_ID_LENGTH)

modules/encrypt-node/src/encrypt_stream.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ export function encryptStream (
7171
const wrappingStream = new Duplexify()
7272

7373
cmm.getEncryptionMaterials({ suite, encryptionContext, frameLength })
74-
.then(async ({ material }) => {
74+
.then(async (material) => {
7575
const { dispose, getSigner } = getEncryptHelper(material)
7676

7777
const { getCipher, messageHeader, rawHeader } = getEncryptionInfo(material, frameLength)

modules/material-management-browser/src/browser_cryptographic_materials_manager.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
import {
1717
WebCryptoMaterialsManager, EncryptionRequest, // eslint-disable-line no-unused-vars
1818
DecryptionRequest, EncryptionContext, // eslint-disable-line no-unused-vars
19-
EncryptionResponse, DecryptionResponse, // eslint-disable-line no-unused-vars
19+
EncryptionMaterial, DecryptionMaterial, // eslint-disable-line no-unused-vars
2020
WebCryptoAlgorithmSuite, WebCryptoEncryptionMaterial,
2121
WebCryptoDecryptionMaterial, SignatureKey, needs, readOnlyProperty,
2222
VerificationKey, AlgorithmSuiteIdentifier, immutableBaseClass,
@@ -29,8 +29,8 @@ import { fromBase64, toBase64 } from '@aws-sdk/util-base64-browser'
2929

3030
export type WebCryptoEncryptionRequest = EncryptionRequest<WebCryptoAlgorithmSuite>
3131
export type WebCryptoDecryptionRequest = DecryptionRequest<WebCryptoAlgorithmSuite>
32-
export type WebCryptoEncryptionResponse = EncryptionResponse<WebCryptoAlgorithmSuite>
33-
export type WebCryptoDecryptionResponse = DecryptionResponse<WebCryptoAlgorithmSuite>
32+
export type WebCryptoEncryptionMaterial = EncryptionMaterial<WebCryptoAlgorithmSuite>
33+
export type WebCryptoDecryptionMaterial = DecryptionMaterial<WebCryptoAlgorithmSuite>
3434
export type WebCryptoGetEncryptionMaterials = GetEncryptionMaterials<WebCryptoAlgorithmSuite>
3535
export type WebCryptoGetDecryptMaterials = GetDecryptMaterials<WebCryptoAlgorithmSuite>
3636

@@ -46,7 +46,7 @@ export class WebCryptoDefaultCryptographicMaterialsManager implements WebCryptoM
4646
needs(keyring instanceof KeyringWebCrypto, 'Unsupported type.')
4747
readOnlyProperty(this, 'keyring', keyring)
4848
}
49-
async getEncryptionMaterials ({ suite, encryptionContext }: WebCryptoEncryptionRequest): Promise<WebCryptoEncryptionResponse> {
49+
async getEncryptionMaterials ({ suite, encryptionContext }: WebCryptoEncryptionRequest): Promise<WebCryptoEncryptionMaterial> {
5050
suite = suite || new WebCryptoAlgorithmSuite(AlgorithmSuiteIdentifier.ALG_AES256_GCM_IV12_TAG16_HKDF_SHA384_ECDSA_P384)
5151

5252
const material = await this
@@ -59,18 +59,18 @@ export class WebCryptoDefaultCryptographicMaterialsManager implements WebCryptoM
5959
/* Postcondition: The WebCryptoEncryptionMaterial must contain at least 1 EncryptedDataKey. */
6060
needs(material.encryptedDataKeys.length, 'No EncryptedDataKeys: the ciphertext can never be decrypted.')
6161

62-
return { material }
62+
return material
6363
}
6464

65-
async decryptMaterials ({ suite, encryptedDataKeys, encryptionContext }: WebCryptoDecryptionRequest): Promise<WebCryptoDecryptionResponse> {
65+
async decryptMaterials ({ suite, encryptedDataKeys, encryptionContext }: WebCryptoDecryptionRequest): Promise<WebCryptoDecryptionMaterial> {
6666
const material = await this
6767
.keyring
6868
.onDecrypt(await this._initializeDecryptionMaterial(suite, encryptionContext), encryptedDataKeys.slice())
6969

7070
/* Postcondition: The WebCryptoDecryptionMaterial must contain a valid dataKey. */
7171
needs(material.hasValidKey(), 'Unencrypted data key is invalid.')
7272

73-
return { material }
73+
return material
7474
}
7575

7676
async _initializeEncryptionMaterial (suite: WebCryptoAlgorithmSuite, encryptionContext: EncryptionContext) {

modules/material-management-browser/test/browser_cryptographic_materials_manager.test.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ describe('WebCryptoDefaultCryptographicMaterialsManager', () => {
203203
some: 'context'
204204
}
205205

206-
const { material } = await cmm.getEncryptionMaterials({ suite, encryptionContext })
206+
const material = await cmm.getEncryptionMaterials({ suite, encryptionContext })
207207
expect(Object.keys(material.encryptionContext)).lengthOf(2)
208208
if (!material.signatureKey) throw new Error('I should never see this error')
209209
expect(material.encryptionContext).to.have.haveOwnProperty(ENCODED_SIGNER_KEY).and.to.equal(toBase64(material.signatureKey.compressPoint))
@@ -233,7 +233,7 @@ describe('WebCryptoDefaultCryptographicMaterialsManager', () => {
233233
some: 'context'
234234
}
235235

236-
const { material } = await cmm.getEncryptionMaterials({ encryptionContext })
236+
const material = await cmm.getEncryptionMaterials({ encryptionContext })
237237
expect(Object.keys(material.encryptionContext)).lengthOf(2)
238238
if (!material.signatureKey) throw new Error('I should never see this error')
239239
expect(material.encryptionContext).to.have.haveOwnProperty(ENCODED_SIGNER_KEY).and.to.equal(toBase64(material.signatureKey.compressPoint))
@@ -309,7 +309,7 @@ describe('WebCryptoDefaultCryptographicMaterialsManager', () => {
309309
const encryptionContext = { some: 'context', [ENCODED_SIGNER_KEY]: 'A29gmBT/NscB90u6npOulZQwAAiKVtoShudOm2J2sCgC' }
310310
const edk = new EncryptedDataKey({ providerId: ' keyNamespace', providerInfo: 'keyName', encryptedDataKey: new Uint8Array(5) })
311311

312-
const { material } = await cmm.decryptMaterials({ suite, encryptionContext, encryptedDataKeys: [edk] })
312+
const material = await cmm.decryptMaterials({ suite, encryptionContext, encryptedDataKeys: [edk] })
313313
if (!material.verificationKey) throw new Error('I should never see this error')
314314
expect(material.encryptionContext).to.deep.equal(encryptionContext)
315315
expect(material.verificationKey.signatureCurve).to.equal(suite.signatureCurve)

modules/material-management-node/src/node_cryptographic_materials_manager.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616
import {
1717
NodeMaterialsManager, EncryptionRequest, DecryptionRequest, EncryptionContext, // eslint-disable-line no-unused-vars
18-
EncryptionResponse, DecryptionResponse, // eslint-disable-line no-unused-vars
18+
EncryptionMaterial, DecryptionMaterial, // eslint-disable-line no-unused-vars
1919
NodeAlgorithmSuite, NodeEncryptionMaterial, NodeDecryptionMaterial, SignatureKey,
2020
needs, VerificationKey, AlgorithmSuiteIdentifier,
2121
immutableClass, readOnlyProperty, KeyringNode,
@@ -28,8 +28,8 @@ import { createECDH } from 'crypto'
2828

2929
export type NodeEncryptionRequest = EncryptionRequest<NodeAlgorithmSuite>
3030
export type NodeDecryptionRequest = DecryptionRequest<NodeAlgorithmSuite>
31-
export type NodeEncryptionResponse = EncryptionResponse<NodeAlgorithmSuite>
32-
export type NodeDecryptionResponse = DecryptionResponse<NodeAlgorithmSuite>
31+
export type NodeEncryptionMaterial = EncryptionMaterial<NodeAlgorithmSuite>
32+
export type NodeDecryptionMaterial = DecryptionMaterial<NodeAlgorithmSuite>
3333
export type NodeGetEncryptionMaterials = GetEncryptionMaterials<NodeAlgorithmSuite>
3434
export type NodeGetDecryptMaterials = GetDecryptMaterials<NodeAlgorithmSuite>
3535

@@ -46,7 +46,7 @@ export class NodeDefaultCryptographicMaterialsManager implements NodeMaterialsMa
4646
readOnlyProperty(this, 'keyring', keyring)
4747
}
4848

49-
async getEncryptionMaterials ({ suite, encryptionContext }: NodeEncryptionRequest): Promise<NodeEncryptionResponse> {
49+
async getEncryptionMaterials ({ suite, encryptionContext }: NodeEncryptionRequest): Promise<NodeEncryptionMaterial> {
5050
suite = suite || new NodeAlgorithmSuite(AlgorithmSuiteIdentifier.ALG_AES256_GCM_IV12_TAG16_HKDF_SHA384_ECDSA_P384)
5151

5252
const material = await this
@@ -59,10 +59,10 @@ export class NodeDefaultCryptographicMaterialsManager implements NodeMaterialsMa
5959
/* Postcondition: The NodeEncryptionMaterial must contain at least 1 EncryptedDataKey. */
6060
needs(material.encryptedDataKeys.length, 'No EncryptedDataKeys: the ciphertext can never be decrypted.')
6161

62-
return { material }
62+
return material
6363
}
6464

65-
async decryptMaterials ({ suite, encryptedDataKeys, encryptionContext }: NodeDecryptionRequest): Promise<NodeDecryptionResponse> {
65+
async decryptMaterials ({ suite, encryptedDataKeys, encryptionContext }: NodeDecryptionRequest): Promise<NodeDecryptionMaterial> {
6666
const material = await this
6767
.keyring
6868
.onDecrypt(this._initializeDecryptionMaterial(suite, encryptionContext), encryptedDataKeys.slice())
@@ -73,7 +73,7 @@ export class NodeDefaultCryptographicMaterialsManager implements NodeMaterialsMa
7373
*/
7474
needs(material.getUnencryptedDataKey(), 'Unencrypted data key is invalid.')
7575

76-
return { material }
76+
return material
7777
}
7878

7979
_initializeEncryptionMaterial (suite: NodeAlgorithmSuite, encryptionContext: EncryptionContext) {

modules/material-management-node/test/node_cryptographic_materials_manager.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,7 @@ describe('NodeDefaultCryptographicMaterialsManager', () => {
258258
providerId: 'p', providerInfo: 'p', encryptedDataKey: new Uint8Array(5)
259259
})]
260260

261-
const { material } = await cmm.decryptMaterials({ suite, encryptedDataKeys, encryptionContext: {} })
261+
const material = await cmm.decryptMaterials({ suite, encryptedDataKeys, encryptionContext: {} })
262262
expect(material.hasUnencryptedDataKey).to.equal(true)
263263
})
264264
})

modules/material-management/src/materials_manager.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
*/
1515

1616
import { EncryptionRequest, DecryptionRequest } from '.' // eslint-disable-line no-unused-vars
17-
import { EncryptionResponse, DecryptionResponse, SupportedAlgorithmSuites } from './types' // eslint-disable-line no-unused-vars
17+
import { EncryptionMaterial, DecryptionMaterial, SupportedAlgorithmSuites } from './types' // eslint-disable-line no-unused-vars
1818
import { NodeAlgorithmSuite } from './node_algorithms' // eslint-disable-line no-unused-vars
1919
import { WebCryptoAlgorithmSuite } from './web_crypto_algorithms' // eslint-disable-line no-unused-vars
2020

@@ -26,11 +26,11 @@ import { WebCryptoAlgorithmSuite } from './web_crypto_algorithms' // eslint-disa
2626
*/
2727

2828
export interface GetEncryptionMaterials<S extends SupportedAlgorithmSuites> {
29-
(request: EncryptionRequest<S>): Promise<EncryptionResponse<S>>
29+
(request: EncryptionRequest<S>): Promise<EncryptionMaterial<S>>
3030
}
3131

3232
export interface GetDecryptMaterials<S extends SupportedAlgorithmSuites> {
33-
(request: DecryptionRequest<S>): Promise<DecryptionResponse<S>>
33+
(request: DecryptionRequest<S>): Promise<DecryptionMaterial<S>>
3434
}
3535

3636
export interface MaterialsManager<S extends SupportedAlgorithmSuites> {

0 commit comments

Comments
 (0)