AlgorithmParameterSpec
public class EdDSAParameterSpec extends Object implements AlgorithmParameterSpec
Constructor | Description |
---|---|
EdDSAParameterSpec |
Construct an EdDSAParameterSpec by specifying whether the prehash mode is used. |
EdDSAParameterSpec |
Construct an EdDSAParameterSpec by specifying a context and whether the prehash mode is used. |
Modifier and Type | Method | Description |
---|---|---|
Optional |
getContext() |
Get the context that the signature will use. |
boolean |
isPrehash() |
Get whether the prehash mode is specified. |
public EdDSAParameterSpec(boolean prehash)
EdDSAParameterSpec
by specifying whether the prehash mode is used. No context is provided so this constructor specifies a mode in which the context is null. Note that this mode may be different from the mode in which an empty array is used as the context.prehash
- whether the prehash mode is specified.public EdDSAParameterSpec(boolean prehash, byte[] context)
EdDSAParameterSpec
by specifying a context and whether the prehash mode is used. The context may not be null, but it may be an empty array. The mode used when the context is an empty array may not be the same as the mode used when the context is absent.prehash
- whether the prehash mode is specified.context
- the context is copied and bound to the signature.NullPointerException
- if context is null.InvalidParameterException
- if context length is greater than 255.public boolean isPrehash()
public Optional<byte[]> getContext()
Optional
contains a copy of the context or empty if context is null.
© 1993, 2023, Oracle and/or its affiliates. All rights reserved.
Documentation extracted from Debian's OpenJDK Development Kit package.
Licensed under the GNU General Public License, version 2, with the Classpath Exception.
Various third party code in OpenJDK is licensed under different licenses (see Debian package).
Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/security/spec/EdDSAParameterSpec.html