-
Notifications
You must be signed in to change notification settings - Fork 573
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(crypto): expose compress/decompress as part of the DidKeyPlu…
…gin interface
- Loading branch information
1 parent
ef961a9
commit 64270cf
Showing
4 changed files
with
25 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,16 @@ | ||
import * as operations from './operations' | ||
import { verifyDidSig } from './operations' | ||
import { compressPubkey, decompressPubkey } from './encoding' | ||
|
||
import { DidKeyPlugin } from '../types' | ||
import { P256_DID_PREFIX, P256_JWT_ALG } from '../const' | ||
|
||
export const p256Plugin: DidKeyPlugin = { | ||
prefix: P256_DID_PREFIX, | ||
jwtAlg: P256_JWT_ALG, | ||
verifySignature: operations.verifyDidSig, | ||
verifySignature: verifyDidSig, | ||
|
||
compressPubkey, | ||
decompressPubkey, | ||
} | ||
|
||
export default p256Plugin |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,16 @@ | ||
import * as operations from './operations' | ||
import { verifyDidSig } from './operations' | ||
import { compressPubkey, decompressPubkey } from './encoding' | ||
|
||
import { DidKeyPlugin } from '../types' | ||
import { SECP256K1_DID_PREFIX, SECP256K1_JWT_ALG } from '../const' | ||
|
||
export const secp256k1Plugin: DidKeyPlugin = { | ||
prefix: SECP256K1_DID_PREFIX, | ||
jwtAlg: SECP256K1_JWT_ALG, | ||
verifySignature: operations.verifyDidSig, | ||
verifySignature: verifyDidSig, | ||
|
||
compressPubkey, | ||
decompressPubkey, | ||
} | ||
|
||
export default secp256k1Plugin |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters