Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix vulnerability in babel dependency #52

Merged
merged 3 commits into from
Jan 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions examples/facade/index.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { CryptoNoble } from '@cloudflare/voprf-ts/crypto-noble'
import { CryptoNoble } from '../../src/cryptoNoble.js'
// You may want to do this when 3rd party dependencies use voprf-ts
// import { Oprf as OprfCore } from '@cloudflare/voprf-ts'
// OprfCore.Crypto = CryptoNoble

import { webcrypto } from 'node:crypto'

import { Oprf, type OprfApi, type SuiteID } from '@cloudflare/voprf-ts/facade'
import { Oprf, type OprfApi, type SuiteID } from '../../src/facade/index.js'

export async function facadeOprfExample(Oprf: OprfApi, suite: SuiteID = Oprf.Suite.P521_SHA512) {
// Setup: Create client and server.
Expand Down Expand Up @@ -145,7 +145,7 @@ export async function facadeVoprfExample(Oprf: OprfApi, suite: SuiteID = Oprf.Su
console.log(`Example VOPRF - SuiteID: ${mode.suite}`)
console.log(`CryptoProvider: ${mode.crypto.id}`)
console.log(`input (${input.length} bytes): ${input}`)
console.log(`output (${output.length} bytes): ${Buffer.from(output).toString('hex')}\n`)
console.log(`output (${output.length} bytes): ${Buffer.from(output).toString('hex')}`)
console.log(`verified: ${verified}\n`)
}

Expand Down
2 changes: 1 addition & 1 deletion examples/oprf.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// Licensed under the BSD-3-Clause license found in the LICENSE file or
// at https://opensource.org/licenses/BSD-3-Clause

import { OPRFClient, OPRFServer, Oprf, randomPrivateKey } from '@cloudflare/voprf-ts'
import { OPRFClient, OPRFServer, Oprf, randomPrivateKey } from '../src/index.js'

// Example: OPRF mode with the P521-SHA512 suite.
export async function oprfExample() {
Expand Down
2 changes: 1 addition & 1 deletion examples/poprf.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import {
POPRFServer,
generatePublicKey,
randomPrivateKey
} from '@cloudflare/voprf-ts'
} from '../src/index.js'

// Example: POPRF mode with the P256_SHA256 suite.
export async function poprfExample() {
Expand Down
7 changes: 0 additions & 7 deletions examples/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,5 @@
{
"extends": "../tsconfig.json",
"compilerOptions": {
"paths": {
"@cloudflare/voprf-ts": ["../src/index.js"],
"@cloudflare/voprf-ts/crypto-noble": ["../src/cryptoNoble.js"],
"@cloudflare/voprf-ts/facade": ["../src/facade/index.js"]
}
},
"include": ["."],
"references": [
{
Expand Down
2 changes: 1 addition & 1 deletion examples/voprf.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import {
VOPRFServer,
generatePublicKey,
randomPrivateKey
} from '@cloudflare/voprf-ts'
} from '../src/index.js'

// Example: VOPRF mode with the P384-SHA384 suite.
export async function voprfExample() {
Expand Down
Loading
Loading