Interface Describable
- All Known Subinterfaces:
UnlockMaterial
- All Known Implementing Classes:
AesKeyGenSpec, AesSpec, BikeKeyGenSpec, ChaCha20Poly1305Spec, ChaChaKeyGenSpec, ChaChaSpec, CmceKeyGenSpec, DhSpec, DigestSpec, EcdsaCurveSpec, ElgamalEncSpec, ElgamalKeyGenSpec, ElgamalParamSpec, FrodoKeyGenSpec, HmacKeyGenSpec, HmacKeyImportSpec, HmacSpec, HqcKeyGenSpec, KyberKeyGenSpec, NtruKeyGenSpec, NtrulPrimeKeyGenSpec, RsaEncSpec, RsaKeyGenSpec, RsaSigSpec, SaberKeyGenSpec, SntruPrimeKeyGenSpec, UnlockMaterial.Password, UnlockMaterial.Private, XdhSpec
public interface Describable
Defines a contract for objects that can provide a concise, human-readable
description.
Implementations of Describable are intended to supply metadata that
is suitable for display in user interfaces, diagnostic logs, or serialization
outputs. This avoids overloading Object.toString() with potentially
verbose or unstable text, and ensures that a stable, context-appropriate
description is available.
Design considerations
- The description should never include sensitive data such as key material.
- Descriptions are meant for human consumption, not for protocol negotiation or cryptographic decisions.
- Catalogs and registries (for example,
CryptoCatalog) can use this interface to extract meaningful labels for algorithms or specs.
Example
public final class AesSpec implements Describable {
@Override
public String description() {
return "AES-256 in GCM mode with 128-bit tag";
}
}
- Since:
- 1.0
-
Method Summary
Modifier and TypeMethodDescriptionReturns a short, human-readable description of this object.
-
Method Details
-
description
String description()Returns a short, human-readable description of this object.The description should be concise and stable enough for logging or display purposes, while avoiding exposure of any sensitive information.
- Returns:
- non-null descriptive string
-