chore(text): source code format

This commit is contained in:
2026-07-30 20:28:43 +02:00
parent bc68e0433c
commit dedd16f584
262 changed files with 4867 additions and 5717 deletions

View File

@@ -25,9 +25,11 @@ import zeroecho.core.spi.SymmetricKeyImporter;
/**
* Session-bound entry point for exact key-material operations.
*
* <p>Capability lookup fails before an operation object is returned. Returned
* <p>
* Capability lookup fails before an operation object is returned. Returned
* objects guarantee the requested operation and report successful execution to
* the owning session's audit listener on a best-effort basis.</p>
* the owning session's audit listener on a best-effort basis.
* </p>
*
* @since 1.0
*/
@@ -69,13 +71,12 @@ public final class KeyBuilders {
* Resolves an exact symmetric generator.
*
* @param algorithmId canonical algorithm identifier
* @param specType exact specification class
* @param <S> specification type
* @param specType exact specification class
* @param <S> specification type
* @return guaranteed generator
* @throws IllegalArgumentException if the capability is absent
*/
public <S extends AlgorithmKeySpec> SymmetricKeyGenerator<S> generator(String algorithmId,
Class<S> specType) {
public <S extends AlgorithmKeySpec> SymmetricKeyGenerator<S> generator(String algorithmId, Class<S> specType) {
CryptoAlgorithm algorithm = session.require(algorithmId);
SymmetricKeyGenerator<S> delegate = algorithm.symmetricKeyGenerator(specType);
return spec -> {
@@ -89,13 +90,12 @@ public final class KeyBuilders {
* Resolves an exact symmetric importer.
*
* @param algorithmId canonical algorithm identifier
* @param specType exact specification class
* @param <S> specification type
* @param specType exact specification class
* @param <S> specification type
* @return guaranteed importer
* @throws IllegalArgumentException if the capability is absent
*/
public <S extends AlgorithmKeySpec> SymmetricKeyImporter<S> importer(String algorithmId,
Class<S> specType) {
public <S extends AlgorithmKeySpec> SymmetricKeyImporter<S> importer(String algorithmId, Class<S> specType) {
CryptoAlgorithm algorithm = session.require(algorithmId);
SymmetricKeyImporter<S> delegate = algorithm.symmetricKeyImporter(specType);
return spec -> {
@@ -109,12 +109,13 @@ public final class KeyBuilders {
* Generates a symmetric key using the exact runtime specification type.
*
* @param algorithmId canonical algorithm identifier
* @param spec generation specification
* @param <S> specification type
* @param spec generation specification
* @param <S> specification type
* @return generated secret key
* @throws java.security.GeneralSecurityException if generation fails
* @throws IllegalArgumentException if the capability is absent
* @throws NullPointerException if {@code spec} is {@code null}
* @throws IllegalArgumentException if the capability is absent
* @throws NullPointerException if {@code spec} is
* {@code null}
*/
public <S extends AlgorithmKeySpec> SecretKey generate(String algorithmId, S spec)
throws java.security.GeneralSecurityException {
@@ -128,12 +129,13 @@ public final class KeyBuilders {
* Imports a symmetric key using the exact runtime specification type.
*
* @param algorithmId canonical algorithm identifier
* @param spec import specification
* @param <S> specification type
* @param spec import specification
* @param <S> specification type
* @return imported secret key
* @throws java.security.GeneralSecurityException if import fails
* @throws IllegalArgumentException if the capability is absent
* @throws NullPointerException if {@code spec} is {@code null}
* @throws IllegalArgumentException if the capability is absent
* @throws NullPointerException if {@code spec} is
* {@code null}
*/
public <S extends AlgorithmKeySpec> SecretKey importKey(String algorithmId, S spec)
throws java.security.GeneralSecurityException {
@@ -155,8 +157,8 @@ public final class KeyBuilders {
* Resolves an exact key-pair generator.
*
* @param algorithmId canonical algorithm identifier
* @param specType exact specification class
* @param <S> specification type
* @param specType exact specification class
* @param <S> specification type
* @return guaranteed generator
* @throws IllegalArgumentException if the capability is absent
*/
@@ -175,13 +177,12 @@ public final class KeyBuilders {
* Resolves an exact public-key importer.
*
* @param algorithmId canonical algorithm identifier
* @param specType exact specification class
* @param <S> specification type
* @param specType exact specification class
* @param <S> specification type
* @return guaranteed importer
* @throws IllegalArgumentException if the capability is absent
*/
public <S extends AlgorithmKeySpec> PublicKeyImporter<S> publicImporter(String algorithmId,
Class<S> specType) {
public <S extends AlgorithmKeySpec> PublicKeyImporter<S> publicImporter(String algorithmId, Class<S> specType) {
CryptoAlgorithm algorithm = session.require(algorithmId);
PublicKeyImporter<S> delegate = algorithm.publicKeyImporter(specType);
return spec -> {
@@ -195,8 +196,8 @@ public final class KeyBuilders {
* Resolves an exact private-key importer.
*
* @param algorithmId canonical algorithm identifier
* @param specType exact specification class
* @param <S> specification type
* @param specType exact specification class
* @param <S> specification type
* @return guaranteed importer
* @throws IllegalArgumentException if the capability is absent
*/
@@ -215,12 +216,13 @@ public final class KeyBuilders {
* Generates a key pair using the exact runtime specification type.
*
* @param algorithmId canonical algorithm identifier
* @param spec generation specification
* @param <S> specification type
* @param spec generation specification
* @param <S> specification type
* @return generated key pair
* @throws java.security.GeneralSecurityException if generation fails
* @throws IllegalArgumentException if the capability is absent
* @throws NullPointerException if {@code spec} is {@code null}
* @throws IllegalArgumentException if the capability is absent
* @throws NullPointerException if {@code spec} is
* {@code null}
*/
public <S extends AlgorithmKeySpec> KeyPair generateKeyPair(String algorithmId, S spec)
throws java.security.GeneralSecurityException {
@@ -234,12 +236,13 @@ public final class KeyBuilders {
* Imports a public key using the exact runtime specification type.
*
* @param algorithmId canonical algorithm identifier
* @param spec public-key import specification
* @param <S> specification type
* @param spec public-key import specification
* @param <S> specification type
* @return imported public key
* @throws java.security.GeneralSecurityException if import fails
* @throws IllegalArgumentException if the capability is absent
* @throws NullPointerException if {@code spec} is {@code null}
* @throws IllegalArgumentException if the capability is absent
* @throws NullPointerException if {@code spec} is
* {@code null}
*/
public <S extends AlgorithmKeySpec> PublicKey importPublic(String algorithmId, S spec)
throws java.security.GeneralSecurityException {
@@ -253,12 +256,13 @@ public final class KeyBuilders {
* Imports a private key using the exact runtime specification type.
*
* @param algorithmId canonical algorithm identifier
* @param spec private-key import specification
* @param <S> specification type
* @param spec private-key import specification
* @param <S> specification type
* @return imported private key
* @throws java.security.GeneralSecurityException if import fails
* @throws IllegalArgumentException if the capability is absent
* @throws NullPointerException if {@code spec} is {@code null}
* @throws IllegalArgumentException if the capability is absent
* @throws NullPointerException if {@code spec} is
* {@code null}
*/
public <S extends AlgorithmKeySpec> PrivateKey importPrivate(String algorithmId, S spec)
throws java.security.GeneralSecurityException {