Skip to content

Commit 580e96e

Browse files
sujankotagithub-actions[bot]
authored andcommitted
🤖 🎨 Autoformat
1 parent 7a94687 commit 580e96e

File tree

5 files changed

+8
-14
lines changed

5 files changed

+8
-14
lines changed

‎cli/src/cli.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ import { webcrypto } from 'crypto';
2323
import * as assertions from '@opentdf/sdk/assertions';
2424
import { attributeFQNsAsValues } from '@opentdf/sdk/nano';
2525
import { base64 } from '@opentdf/sdk/encodings';
26-
import { PolicyType} from '@opentdf/sdk';
26+
import { PolicyType } from '@opentdf/sdk';
2727
import { type CryptoKey, importPKCS8, importSPKI } from 'jose'; // for RS256
2828

2929
type AuthToProcess = {
@@ -318,7 +318,7 @@ async function parseCreateNanoTDFOptions(argv: Partial<mainArgs>): Promise<Creat
318318
}
319319

320320
if (argv.policyType) {
321-
c.policyType = PolicyType[argv.policyType as keyof typeof PolicyType]
321+
c.policyType = PolicyType[argv.policyType as keyof typeof PolicyType];
322322
}
323323
// NOTE autoconfigure is not yet supported in nanotdf
324324
delete c.autoconfigure;

‎lib/src/index.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@ export { PlatformClient, type PlatformClientOptions, type PlatformServices } fro
66
export * from './opentdf.js';
77
export * from './seekable.js';
88
export * from '../tdf3/src/models/index.js';
9-
export { default as PolicyType } from './nanotdf/enum/PolicyTypeEnum.js';
9+
export { default as PolicyType } from './nanotdf/enum/PolicyTypeEnum.js';

‎lib/src/nanoclients.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,7 @@ export class NanoTDFDatasetClient extends Client {
295295
ivVector,
296296
data,
297297
this.ecdsaBinding,
298-
mergedOptions.policyType,
298+
mergedOptions.policyType
299299
);
300300

301301
// Cache the header and increment the key iteration

‎lib/src/nanotdf/encrypt.ts‎

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -66,16 +66,10 @@ export default async function encrypt(
6666
const policyIV = new Uint8Array(iv.length).fill(0);
6767
const policyAsBuffer = new TextEncoder().encode(policy);
6868
policyContent = new Uint8Array(
69-
await cryptoEncrypt(
70-
symmetricKey,
71-
policyAsBuffer,
72-
policyIV,
73-
authTagLengthInBytes * 8
74-
)
69+
await cryptoEncrypt(symmetricKey, policyAsBuffer, policyIV, authTagLengthInBytes * 8)
7570
);
7671
}
7772

78-
7973
let policyBinding: Uint8Array;
8074

8175
// Calculate the policy binding.

‎lib/src/opentdf.ts‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -762,11 +762,11 @@ class Collection {
762762
if (opts.ecdsaBindingKeyID) {
763763
throw new ConfigurationError('custom binding key not implemented');
764764
}
765-
765+
766766
// Initialize encryptOptions with policyType if provided
767-
this.encryptOptions = {
767+
this.encryptOptions = {
768768
ecdsaBinding: opts.bindingType === 'ecdsa',
769-
policyType: opts.policyType
769+
policyType: opts.policyType,
770770
};
771771

772772
const kasEndpoint =

0 commit comments

Comments
 (0)