Skip to content

Commit

Permalink
chore: Prettier updates
Browse files Browse the repository at this point in the history
  • Loading branch information
seebees committed Jul 13, 2021
1 parent 13f63f5 commit 6b1d1a6
Show file tree
Hide file tree
Showing 60 changed files with 1,375 additions and 10,843 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,8 @@ export function buildCryptographicMaterialsCacheKeyHelpers<
toUtf8: (input: Uint8Array) => string,
sha512: (...data: (Uint8Array | string)[]) => Promise<Uint8Array>
): CryptographicMaterialsCacheKeyHelpersInterface<S> {
const {
serializeEncryptionContext,
serializeEncryptedDataKey,
} = serializeFactory(fromUtf8)
const { serializeEncryptionContext, serializeEncryptedDataKey } =
serializeFactory(fromUtf8)

return {
buildEncryptionMaterialCacheKey,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,22 +84,17 @@ export function getEncryptionMaterials<S extends SupportedAlgorithmSuites>({
this: CachingMaterialsManager<S>,
request: EncryptionRequest<S>
): Promise<EncryptionMaterial<S>> {
const {
suite,
encryptionContext,
plaintextLength,
commitmentPolicy,
} = request
const { suite, encryptionContext, plaintextLength, commitmentPolicy } =
request

/* Check for early return (Postcondition): If I can not cache the EncryptionMaterial, do not even look. */
if (
(suite && !suite.cacheSafe) ||
typeof plaintextLength !== 'number' ||
plaintextLength < 0
) {
const material = await this._backingMaterialsManager.getEncryptionMaterials(
request
)
const material =
await this._backingMaterialsManager.getEncryptionMaterials(request)
return material
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -188,22 +188,7 @@ describe('Cryptographic Material Functions', () => {

const nodeSuite = new NodeAlgorithmSuite(suiteId)
const udk128 = new Uint8Array([
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16,
])
const encryptTrace = {
keyNamespace: 'keyNamespace',
Expand Down Expand Up @@ -381,22 +366,7 @@ describe('Cryptographic Material Functions', () => {

const nodeSuite = new NodeAlgorithmSuite(suiteId)
const udk128 = new Uint8Array([
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16,
])
const encryptTrace = {
keyNamespace: 'keyNamespace',
Expand Down Expand Up @@ -472,22 +442,7 @@ describe('Cryptographic Material Functions', () => {

const nodeSuite = new NodeAlgorithmSuite(suiteId)
const udk128 = new Uint8Array([
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16,
])
const encryptTrace = {
keyNamespace: 'keyNamespace',
Expand Down
Loading

0 comments on commit 6b1d1a6

Please sign in to comment.