UNPKG

signicat-client-ts

Version:

Community TypeScript client for Signicat Authentication REST API with automatic token management

78 lines (77 loc) 2.16 kB
/** * Encryption key information. */ export type EncryptionKey = { /** * Key type of the JWK, specifying the cryptographic algorithm family used with the key. */ kty: EncryptionKey.kty; /** * Identifies the intended use of the key. Values defined by this specification are sig (signature) and enc (encryption). */ use: EncryptionKey.use; /** * Identifier of the key, serves as a unique identifier for the key. */ kid?: string | null; /** * Identifies the cryptographic algorithm family used with the key. * If kty is set to RSA needs to be RSA-OAEP. * If kty is set to EC needs to be ECDH-ES. */ alg: EncryptionKey.alg; /** * The public exponent. * Required if the Kty is RSA. */ e?: string | null; /** * The modulus, a component that is used in both the encryption and decryption process. * Required if the Kty is RSA. */ n?: string | null; /** * Identifies the cryptographic curve used with the key. * Required if the Kty is EC. */ crv?: string | null; /** * Contains the x coordinate for the elliptic curve point. * Required if the Kty is EC. */ x?: string | null; /** * Contains the Y coordinate for the elliptic curve point. * Required if the Kty is EC. */ y?: string | null; /** * Contains the private exponent parameter. * This needs to be null. */ d?: string | null; }; export declare namespace EncryptionKey { /** * Key type of the JWK, specifying the cryptographic algorithm family used with the key. */ enum kty { RSA = "rsa", EC = "ec" } /** * Identifies the intended use of the key. Values defined by this specification are sig (signature) and enc (encryption). */ enum use { ENC = "enc" } /** * Identifies the cryptographic algorithm family used with the key. * If kty is set to RSA needs to be RSA-OAEP. * If kty is set to EC needs to be ECDH-ES. */ enum alg { RSA_OAEP = "RSA-OAEP", ECDH_ES = "ECDH-ES" } }