@@ -109,7 +109,6 @@ export interface CryptographicMaterial<T extends CryptographicMaterial<T>> {
109
109
getUnencryptedDataKey : ( ) => Uint8Array | AwsEsdkKeyObject
110
110
zeroUnencryptedDataKey : ( ) => T
111
111
hasUnencryptedDataKey : boolean
112
- unencryptedDataKeyLength : number
113
112
keyringTrace : KeyringTrace [ ]
114
113
encryptionContext : Readonly < EncryptionContext >
115
114
}
@@ -141,7 +140,6 @@ export class NodeEncryptionMaterial implements
141
140
getUnencryptedDataKey ! : ( ) => Uint8Array | AwsEsdkKeyObject
142
141
zeroUnencryptedDataKey ! : ( ) => NodeEncryptionMaterial
143
142
hasUnencryptedDataKey ! : boolean
144
- unencryptedDataKeyLength ! : number
145
143
keyringTrace : KeyringTrace [ ] = [ ]
146
144
encryptedDataKeys ! : EncryptedDataKey [ ]
147
145
addEncryptedDataKey ! : ( edk : EncryptedDataKey , flags : KeyringTraceFlag ) => NodeEncryptionMaterial
@@ -176,7 +174,6 @@ export class NodeDecryptionMaterial implements
176
174
getUnencryptedDataKey ! : ( ) => Uint8Array | AwsEsdkKeyObject
177
175
zeroUnencryptedDataKey ! : ( ) => NodeDecryptionMaterial
178
176
hasUnencryptedDataKey ! : boolean
179
- unencryptedDataKeyLength ! : number
180
177
keyringTrace : KeyringTrace [ ] = [ ]
181
178
setVerificationKey ! : ( key : VerificationKey ) => NodeDecryptionMaterial
182
179
verificationKey ?: VerificationKey
@@ -210,7 +207,6 @@ export class WebCryptoEncryptionMaterial implements
210
207
getUnencryptedDataKey ! : ( ) => Uint8Array | AwsEsdkKeyObject
211
208
zeroUnencryptedDataKey ! : ( ) => WebCryptoEncryptionMaterial
212
209
hasUnencryptedDataKey ! : boolean
213
- unencryptedDataKeyLength ! : number
214
210
keyringTrace : KeyringTrace [ ] = [ ]
215
211
encryptedDataKeys ! : EncryptedDataKey [ ]
216
212
addEncryptedDataKey ! : ( edk : EncryptedDataKey , flags : KeyringTraceFlag ) => WebCryptoEncryptionMaterial
@@ -252,7 +248,6 @@ export class WebCryptoDecryptionMaterial implements
252
248
getUnencryptedDataKey ! : ( ) => Uint8Array | AwsEsdkKeyObject
253
249
zeroUnencryptedDataKey ! : ( ) => WebCryptoDecryptionMaterial
254
250
hasUnencryptedDataKey ! : boolean
255
- unencryptedDataKeyLength ! : number
256
251
keyringTrace : KeyringTrace [ ] = [ ]
257
252
setVerificationKey ! : ( key : VerificationKey ) => WebCryptoDecryptionMaterial
258
253
verificationKey ?: VerificationKey
@@ -367,21 +362,6 @@ export function decorateCryptographicMaterial<T extends CryptographicMaterial<T>
367
362
needs ( unsetCount === 0 || unsetCount === 2 , 'Either unencryptedDataKey or udkForVerification was not set.' )
368
363
return material
369
364
}
370
- Object . defineProperty ( material , 'unencryptedDataKeyLength' , {
371
- get : ( ) => {
372
- /* Precondition: The unencryptedDataKey must be set to have a length. */
373
- needs ( unencryptedDataKey , 'unencryptedDataKey has not been set' )
374
- /* Precondition: the unencryptedDataKey must not be Zeroed out.
375
- * returning information about the data key,
376
- * while not the worst thing may indicate misuse.
377
- * Checking the algorithm specification is the proper way
378
- * to do this
379
- */
380
- needs ( ! unencryptedDataKeyZeroed , 'unencryptedDataKey has been zeroed.' )
381
- return unwrapDataKey ( unencryptedDataKey ) . byteLength
382
- } ,
383
- enumerable : true
384
- } )
385
365
386
366
readOnlyProperty ( material , 'setUnencryptedDataKey' , setUnencryptedDataKey )
387
367
readOnlyProperty ( material , 'getUnencryptedDataKey' , getUnencryptedDataKey )
0 commit comments