8318096: Introduce AsymmetricKey interface with a getParams method

Reviewed-by: darcy, mullan, ascarpino
This commit is contained in:
Weijun Wang 2023-10-26 22:43:06 +00:00
parent 4a142c3b08
commit 9123961aaa
18 changed files with 313 additions and 20 deletions

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2018, 2023, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -26,6 +26,7 @@ package java.security.interfaces;
import java.math.BigInteger;
import java.security.PublicKey;
import java.security.spec.AlgorithmParameterSpec;
/**
* An interface for an elliptic curve public key as defined by RFC 7748.
@ -52,5 +53,18 @@ public interface XECPublicKey extends XECKey, PublicKey {
*/
BigInteger getU();
/**
* {@inheritDoc java.security.AsymmetricKey}
*
* @implSpec
* The default implementation returns {@code null}.
*
* @return {@inheritDoc java.security.AsymmetricKey}
* @since 22
*/
@Override
default AlgorithmParameterSpec getParams() {
return null;
}
}