Skip to content

Commit

Permalink
Add JsonWebKeyExtended interface for AKP.
Browse files Browse the repository at this point in the history
  • Loading branch information
dajiaji committed Nov 6, 2024
1 parent 0f8e5db commit 46e0b35
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
1 change: 1 addition & 0 deletions packages/common/mod.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ export type { AeadEncryptionContext } from "./src/interfaces/aeadEncryptionConte
export type { AeadInterface } from "./src/interfaces/aeadInterface.ts";
export type { DhkemPrimitives } from "./src/interfaces/dhkemPrimitives.ts";
export type { DhkemInterface } from "./src/interfaces/dhkemInterface.ts";
export type { JsonWebKeyExtended } from "./src/interfaces/jsonWebKeyExtended.ts";
export type { KdfInterface } from "./src/interfaces/kdfInterface.ts";
export type { KemInterface } from "./src/interfaces/kemInterface.ts";
export type { KeyScheduleParams } from "./src/interfaces/keyScheduleParams.ts";
Expand Down
12 changes: 12 additions & 0 deletions packages/common/src/interfaces/jsonWebKeyExtended.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
/**
* Extended JsonWebKey interface to support `pub` and `priv` properties,
* which are not supported by the current `JsonWebKey`.
* Both of them are defined for the newly defined JSON WWb Key type AKP (Algorithm Key Pair),
* which is used to express Public and Private Keys for use with Algorithms.
*/
export interface JsonWebKeyExtended extends JsonWebKey {
/** The public key in base64url encoding, which is used with the 'AKP' key type. */
pub?: string;
/** The private key in base64url encoding, which is used with the 'AKP' key type. */
priv?: string;
}

0 comments on commit 46e0b35

Please sign in to comment.