File tree Expand file tree Collapse file tree 2 files changed +7
-2
lines changed
src/client-side-encryption/providers Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change 1+ import type { Binary } from '../../bson' ;
12import { loadAWSCredentials } from './aws' ;
23import { loadAzureCredentials } from './azure' ;
34import { loadGCPCredentials } from './gcp' ;
@@ -39,7 +40,7 @@ export interface LocalKMSProviderConfiguration {
3940 * The master key used to encrypt/decrypt data keys.
4041 * A 96-byte long Buffer or base64 encoded string.
4142 */
42- key : Buffer | string ;
43+ key : Binary | Uint8Array | string ;
4344}
4445
4546/** @public */
Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ import type {
99 KMSProviders ,
1010 RangeOptions
1111} from '../..' ;
12- import type { ClientEncryptionDataKeyProvider } from '../mongodb' ;
12+ import { Binary , type ClientEncryptionDataKeyProvider } from '../mongodb' ;
1313
1414type RequiredCreateEncryptedCollectionSettings = Parameters <
1515 ClientEncryption [ 'createEncryptedCollection' ]
@@ -51,6 +51,10 @@ expectAssignable<RequiredCreateEncryptedCollectionSettings>({
5151
5252{
5353 // KMSProviders
54+ // local
55+ expectAssignable < KMSProviders [ 'local' ] > ( { key : '' } ) ;
56+ expectAssignable < KMSProviders [ 'local' ] > ( { key : Buffer . alloc ( 0 ) } ) ;
57+ expectAssignable < KMSProviders [ 'local' ] > ( { key : Binary . createFromBase64 ( '' ) } ) ;
5458 // aws
5559 expectAssignable < KMSProviders [ 'aws' ] > ( { accessKeyId : '' , secretAccessKey : '' } ) ;
5660 expectAssignable < KMSProviders [ 'aws' ] > ( {
You can’t perform that action at this time.
0 commit comments