Skip to content

Commit

Permalink
Updating dependencies Jun 2023.
Browse files Browse the repository at this point in the history
  • Loading branch information
armfazh committed Jun 20, 2023
1 parent e84b252 commit 4ea0d5e
Show file tree
Hide file tree
Showing 6 changed files with 795 additions and 4,275 deletions.
3 changes: 3 additions & 0 deletions jest.config.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,8 @@
"./test/jest.setup-file.js"
],
"collectCoverage": true,
"collectCoverageFrom": [
"!**/*.json"
],
"verbose": true
}
5,034 changes: 772 additions & 4,262 deletions package-lock.json

Large diffs are not rendered by default.

18 changes: 10 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@
"version": "0.21.0",
"description": "voprf-ts: A TypeScript Library for Oblivious Pseudorandom Functions (OPRF)",
"author": "Armando Faz <[email protected]>",
"maintainers": "Armando Faz <[email protected]>",
"maintainers": [
"Armando Faz <[email protected]>"
],
"license": "BSD-3-Clause",
"private": false,
"type": "module",
Expand All @@ -29,18 +31,18 @@
"devDependencies": {
"@types/benchmark": "2.1.2",
"@types/jest": "29.2.3",
"@typescript-eslint/eslint-plugin": "5.43.0",
"@typescript-eslint/parser": "5.43.0",
"@typescript-eslint/eslint-plugin": "5.60.0",
"@typescript-eslint/parser": "5.60.0",
"benchmark": "2.1.4",
"eslint": "8.27.0",
"eslint-config-prettier": "8.5.0",
"eslint": "8.43.0",
"eslint-config-prettier": "8.8.0",
"eslint-plugin-jest": "27.1.5",
"eslint-plugin-jest-formatting": "3.1.0",
"eslint-plugin-prettier": "4.2.1",
"eslint-plugin-security": "1.5.0",
"eslint-plugin-security": "1.7.1",
"jest": "29.3.1",
"prettier": "2.7.1",
"typescript": "4.8.4",
"prettier": "2.8.8",
"typescript": "5.1.3",
"sjcl": "1.0.8"
},
"scripts": {
Expand Down
7 changes: 6 additions & 1 deletion src/groupTypes.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
// Copyright (c) 2021 Cloudflare, Inc. and contributors.
// Copyright (c) 2021 Cloudflare, Inc.
// Licensed under the BSD-3-Clause license found in the LICENSE file or
// at https://opensource.org/licenses/BSD-3-Clause

export const GroupIDs = {
P256: 'P-256',
P384: 'P-384',
P521: 'P-521'
} as const

export type GroupID = typeof GroupIDs[keyof typeof GroupIDs]
export type GroupID = (typeof GroupIDs)[keyof typeof GroupIDs]

export function errBadGroup(X: string) {
return new Error(`group: bad group name ${X}.`)
Expand Down
4 changes: 2 additions & 2 deletions src/oprf.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ import {
toU16LenPrefixUint8Array
} from './util.js'

export type ModeID = typeof Oprf.Mode[keyof typeof Oprf.Mode]
export type SuiteID = typeof Oprf.Suite[keyof typeof Oprf.Suite]
export type ModeID = (typeof Oprf.Mode)[keyof typeof Oprf.Mode]
export type SuiteID = (typeof Oprf.Suite)[keyof typeof Oprf.Suite]

function assertNever(name: string, x: unknown): never {
throw new Error(`unexpected ${name} identifier: ${x}`)
Expand Down
4 changes: 2 additions & 2 deletions test/vectors.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ class wrapPOPRFClient extends POPRFClient {

// Test vectors from https://datatracker.ietf.org/doc/draft-irtf-cfrg-voprf
// https://tools.ietf.org/html/draft-irtf-cfrg-voprf-11
describe.each(allVectors)('test-vectors', (testVector: typeof allVectors[number]) => {
describe.each(allVectors)('test-vectors', (testVector: (typeof allVectors)[number]) => {
const mode = testVector.mode as ModeID
const txtMode = Object.entries(Oprf.Mode)[mode as number][0]
const describe_or_skip = (Object.values(Oprf.Suite) as readonly string[]).includes(
Expand Down Expand Up @@ -115,7 +115,7 @@ describe.each(allVectors)('test-vectors', (testVector: typeof allVectors[number]

const { vectors } = testVector

describe.each(vectors)('vec$#', (vi: typeof vectors[number]) => {
describe.each(vectors)('vec$#', (vi: (typeof vectors)[number]) => {
it('protocol', async () => {
// Creates a mock for randomBlinder method to
// inject the blind value given by the test vector.
Expand Down

0 comments on commit 4ea0d5e

Please sign in to comment.