def shared_secret(other_jwk)
      other_jwk = from(other_jwk) if not other_jwk.is_a?(JOSE::JWK)
      raise ArgumentError, "key types must match" if other_jwk.kty.class != kty.class
      raise ArgumentError, "key type does not support shared secret computations" if not kty.respond_to?(:derive_key)
      return kty.derive_key(other_jwk)
    end
def shared_secret(other_jwk)
      other_jwk = from(other_jwk) if not other_jwk.is_a?(JOSE::JWK)
      raise ArgumentError, "key types must match" if other_jwk.kty.class != kty.class
      raise ArgumentError, "key type does not support shared secret computations" if not kty.respond_to?(:derive_key)
      return kty.derive_key(other_jwk)
    end
Computes the shared secret between two keys.

 Currently only works for `"EC"` keys and `"OKP"` keys with `"crv"` set to `"X25519"` or `"X448"`.

 @param [JOSE::JWK] other_jwk
 @return [String]