Class COSEOKPKey

  • Constructor Details

    • COSEOKPKey

      public COSEOKPKey(List<? extends CBORPair> pairs)
      A constructor with key parameters.
      Parameters:
      pairs - Key parameters.
  • Method Details

    • isPrivate

      public boolean isPrivate()
      Description copied from class: COSEKey
      Get the flag indicating whether this key contains private parameters.

      Subclasses of the COSEKey class are expected to override this method.

      Overrides:
      isPrivate in class COSEKey
      Returns:
      true if this key contains private parameters.
    • addJwkProperties

      protected void addJwkProperties(Map<String,Object> map)
      Description copied from class: COSEKey
      Add JWK properties to the given map.

      This method is called from within the COSEKey.toJwk() method. Subclasses of the COSEKey class should override this method.

      Overrides:
      addJwkProperties in class COSEKey
      Parameters:
      map - A map to which JWK properties should be added.
    • getCrv

      public Object getCrv()
      Get the curve (the value of the crv parameter).

      The type of the value is an integer (int, long or BigInteger) or a string (String).

      Returns:
      The curve.
      See Also:
    • getX

      public byte[] getX()
      Get the public key (the value of the x parameter).
      Returns:
      The public key.
    • getD

      public byte[] getD()
      Get the private key (the value of the d parameter).
      Returns:
      The private key.