iya-sts
    Preparing search index...

    Function coseKeyToJwk

    • Converts a COSE_Key map to a JWK, carrying the key's algorithm on it.

      Parameters

      • coseKey: any

        the decoded COSE_Key, a Map

      Returns {
          alg: any;
          coseAlg: any;
          jwk:
              | {
                  crv: any;
                  e?: undefined;
                  kty: string;
                  n?: undefined;
                  pub?: undefined;
                  x: any;
                  y: any;
              }
              | {
                  crv?: undefined;
                  e: any;
                  kty: string;
                  n: any;
                  pub?: undefined;
                  x?: undefined;
                  y?: undefined;
              }
              | {
                  crv: any;
                  e?: undefined;
                  kty: string;
                  n?: undefined;
                  pub?: undefined;
                  x: any;
                  y?: undefined;
              }
              | {
                  crv?: undefined;
                  e?: undefined;
                  kty: string;
                  n?: undefined;
                  pub: any;
                  x?: undefined;
                  y?: undefined;
              };
      }

      the JWK, the JOSE algorithm name (or null) and the COSE alg

      when the value is not a COSE_Key or its key type or curve is not supported