Algorithm Class — spring-boot Architecture
Architecture documentation for the Algorithm class in CertificateMatchingTestSource.java from the spring-boot codebase.
Entity Profile
Source Code
core/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/ssl/CertificateMatchingTestSource.java lines 101–125
record Algorithm(String name, @Nullable AlgorithmParameterSpec spec) {
KeyPair generateKeyPair() throws NoSuchAlgorithmException, InvalidAlgorithmParameterException {
KeyPairGenerator generator = KeyPairGenerator.getInstance(this.name);
if (this.spec != null) {
generator.initialize(this.spec);
}
return generator.generateKeyPair();
}
@Override
public String toString() {
String spec = (this.spec instanceof NamedParameterSpec namedSpec) ? namedSpec.getName() : "";
return this.name + ((!spec.isEmpty()) ? ":" + spec : "");
}
static Algorithm of(String name) {
return new Algorithm(name, null);
}
static Algorithm ec(String curve) {
return new Algorithm("EC", new ECGenParameterSpec(curve));
}
}
Source
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free