File tree Expand file tree Collapse file tree 10 files changed +36
-51
lines changed
caching-materials-manager-browser/src
caching-materials-manager-node/src
material-management-browser/src
material-management-node/src Expand file tree Collapse file tree 10 files changed +36
-51
lines changed Original file line number Diff line number Diff line change @@ -79,9 +79,7 @@ export function decorateProperties<S extends SupportedAlgorithmSuites>(
79
79
80
80
export function getEncryptionMaterials < S extends SupportedAlgorithmSuites > ( {
81
81
buildEncryptionMaterialCacheKey,
82
- } : CryptographicMaterialsCacheKeyHelpersInterface < S > ) : GetEncryptionMaterials <
83
- S
84
- > {
82
+ } : CryptographicMaterialsCacheKeyHelpersInterface < S > ) : GetEncryptionMaterials < S > {
85
83
return async function getEncryptionMaterials (
86
84
this : CachingMaterialsManager < S > ,
87
85
request : EncryptionRequest < S >
@@ -226,8 +224,7 @@ function cloneResponse<
226
224
227
225
export interface CachingMaterialsManagerInput <
228
226
S extends SupportedAlgorithmSuites
229
- >
230
- extends Readonly < {
227
+ > extends Readonly < {
231
228
cache : CryptographicMaterialsCache < S >
232
229
backingMaterials : MaterialsManager < S > | Keyring < S >
233
230
partition ?: string
Original file line number Diff line number Diff line change @@ -60,13 +60,11 @@ export class WebCryptoCachingMaterialsManager
60
60
} )
61
61
}
62
62
63
- getEncryptionMaterials : WebCryptoGetEncryptionMaterials = getEncryptionMaterials <
64
- WebCryptoAlgorithmSuite
65
- > ( cacheKeyHelpers )
66
- decryptMaterials : WebCryptoGetDecryptMaterials = decryptMaterials <
67
- WebCryptoAlgorithmSuite
68
- > ( cacheKeyHelpers )
69
- _cacheEntryHasExceededLimits = cacheEntryHasExceededLimits <
70
- WebCryptoAlgorithmSuite
71
- > ( )
63
+ getEncryptionMaterials : WebCryptoGetEncryptionMaterials = getEncryptionMaterials < WebCryptoAlgorithmSuite > (
64
+ cacheKeyHelpers
65
+ )
66
+ decryptMaterials : WebCryptoGetDecryptMaterials = decryptMaterials < WebCryptoAlgorithmSuite > (
67
+ cacheKeyHelpers
68
+ )
69
+ _cacheEntryHasExceededLimits = cacheEntryHasExceededLimits < WebCryptoAlgorithmSuite > ( )
72
70
}
Original file line number Diff line number Diff line change @@ -59,13 +59,11 @@ export class NodeCachingMaterialsManager
59
59
} )
60
60
}
61
61
62
- getEncryptionMaterials : NodeGetEncryptionMaterials = getEncryptionMaterials <
63
- NodeAlgorithmSuite
64
- > ( cacheKeyHelpers )
65
- decryptMaterials : NodeGetDecryptMaterials = decryptMaterials <
66
- NodeAlgorithmSuite
67
- > ( cacheKeyHelpers )
68
- _cacheEntryHasExceededLimits = cacheEntryHasExceededLimits <
69
- NodeAlgorithmSuite
70
- > ( )
62
+ getEncryptionMaterials : NodeGetEncryptionMaterials = getEncryptionMaterials < NodeAlgorithmSuite > (
63
+ cacheKeyHelpers
64
+ )
65
+ decryptMaterials : NodeGetDecryptMaterials = decryptMaterials < NodeAlgorithmSuite > (
66
+ cacheKeyHelpers
67
+ )
68
+ _cacheEntryHasExceededLimits = cacheEntryHasExceededLimits < NodeAlgorithmSuite > ( )
71
69
}
Original file line number Diff line number Diff line change @@ -29,18 +29,10 @@ import {
29
29
} from '@aws-crypto/web-crypto-backend'
30
30
import { fromBase64 , toBase64 } from '@aws-sdk/util-base64-browser'
31
31
32
- export type WebCryptoEncryptionRequest = EncryptionRequest <
33
- WebCryptoAlgorithmSuite
34
- >
35
- export type WebCryptoDecryptionRequest = DecryptionRequest <
36
- WebCryptoAlgorithmSuite
37
- >
38
- export type WebCryptoGetEncryptionMaterials = GetEncryptionMaterials <
39
- WebCryptoAlgorithmSuite
40
- >
41
- export type WebCryptoGetDecryptMaterials = GetDecryptMaterials <
42
- WebCryptoAlgorithmSuite
43
- >
32
+ export type WebCryptoEncryptionRequest = EncryptionRequest < WebCryptoAlgorithmSuite >
33
+ export type WebCryptoDecryptionRequest = DecryptionRequest < WebCryptoAlgorithmSuite >
34
+ export type WebCryptoGetEncryptionMaterials = GetEncryptionMaterials < WebCryptoAlgorithmSuite >
35
+ export type WebCryptoGetDecryptMaterials = GetDecryptMaterials < WebCryptoAlgorithmSuite >
44
36
45
37
/**
46
38
* The WebCryptoDefaultCryptographicMaterialsManager is a specific implementation of the CryptographicMaterialsManager.
Original file line number Diff line number Diff line change @@ -55,9 +55,9 @@ export interface WebCryptoEncryptionMaterialHelper {
55
55
}
56
56
57
57
export interface GetEncryptHelper {
58
- ( material : WebCryptoEncryptionMaterial ) : Promise <
59
- WebCryptoEncryptionMaterialHelper
60
- >
58
+ (
59
+ material : WebCryptoEncryptionMaterial
60
+ ) : Promise < WebCryptoEncryptionMaterialHelper >
61
61
}
62
62
63
63
export const getEncryptHelper : GetEncryptHelper = async (
@@ -109,9 +109,9 @@ export interface WebCryptoDecryptionMaterialHelper {
109
109
}
110
110
111
111
export interface GetDecryptionHelper {
112
- ( material : WebCryptoDecryptionMaterial ) : Promise <
113
- WebCryptoDecryptionMaterialHelper
114
- >
112
+ (
113
+ material : WebCryptoDecryptionMaterial
114
+ ) : Promise < WebCryptoDecryptionMaterialHelper >
115
115
}
116
116
117
117
export const getDecryptionHelper : GetDecryptionHelper = async (
Original file line number Diff line number Diff line change @@ -26,9 +26,7 @@ import { createECDH } from 'crypto'
26
26
27
27
export type NodeEncryptionRequest = EncryptionRequest < NodeAlgorithmSuite >
28
28
export type NodeDecryptionRequest = DecryptionRequest < NodeAlgorithmSuite >
29
- export type NodeGetEncryptionMaterials = GetEncryptionMaterials <
30
- NodeAlgorithmSuite
31
- >
29
+ export type NodeGetEncryptionMaterials = GetEncryptionMaterials < NodeAlgorithmSuite >
32
30
export type NodeGetDecryptMaterials = GetDecryptMaterials < NodeAlgorithmSuite >
33
31
34
32
/**
Original file line number Diff line number Diff line change @@ -122,7 +122,5 @@ immutableBaseClass(Keyring)
122
122
123
123
export abstract class KeyringNode extends Keyring < NodeAlgorithmSuite > { }
124
124
immutableClass ( KeyringNode )
125
- export abstract class KeyringWebCrypto extends Keyring <
126
- WebCryptoAlgorithmSuite
127
- > { }
125
+ export abstract class KeyringWebCrypto extends Keyring < WebCryptoAlgorithmSuite > { }
128
126
immutableClass ( KeyringWebCrypto )
Original file line number Diff line number Diff line change @@ -13,7 +13,8 @@ import { EncryptedDataKey } from './encrypted_data_key'
13
13
import { NodeAlgorithmSuite } from './node_algorithms'
14
14
import { WebCryptoAlgorithmSuite } from './web_crypto_algorithms'
15
15
16
- export class MultiKeyringNode extends KeyringNode
16
+ export class MultiKeyringNode
17
+ extends KeyringNode
17
18
implements MultiKeyring < NodeAlgorithmSuite > {
18
19
public readonly generator ?: KeyringNode
19
20
public readonly children ! : ReadonlyArray < KeyringNode >
@@ -26,7 +27,8 @@ export class MultiKeyringNode extends KeyringNode
26
27
}
27
28
immutableClass ( MultiKeyringNode )
28
29
29
- export class MultiKeyringWebCrypto extends KeyringWebCrypto
30
+ export class MultiKeyringWebCrypto
31
+ extends KeyringWebCrypto
30
32
implements MultiKeyring < WebCryptoAlgorithmSuite > {
31
33
public readonly generator ?: KeyringWebCrypto
32
34
public readonly children ! : ReadonlyArray < KeyringWebCrypto >
Original file line number Diff line number Diff line change @@ -266,7 +266,8 @@ const nodeAlgorithms: NodeAlgorithms = Object.freeze({
266
266
) ,
267
267
} )
268
268
269
- export class NodeAlgorithmSuite extends AlgorithmSuite
269
+ export class NodeAlgorithmSuite
270
+ extends AlgorithmSuite
270
271
implements NodeAlgorithmSuiteValues {
271
272
messageFormat ! : MessageFormat
272
273
encryption ! : NodeEncryption
Original file line number Diff line number Diff line change @@ -319,7 +319,8 @@ const supportedWebCryptoAlgorithms: SupportedWebCryptoAlgorithms = Object.freeze
319
319
}
320
320
)
321
321
322
- export class WebCryptoAlgorithmSuite extends AlgorithmSuite
322
+ export class WebCryptoAlgorithmSuite
323
+ extends AlgorithmSuite
323
324
implements WebCryptoAlgorithmSuiteValues {
324
325
messageFormat ! : MessageFormat
325
326
encryption ! : WebCryptoEncryption
You can’t perform that action at this time.
0 commit comments