Home / Function/ createKeySpecForSec1Ec() — spring-boot Function Reference

createKeySpecForSec1Ec() — spring-boot Function Reference

Architecture documentation for the createKeySpecForSec1Ec() function in PemPrivateKeyParser.java from the spring-boot codebase.

Entity Profile

Dependency Diagram

graph TD
  3ec5bf80_7c44_d0c9_be14_961b40d5ef6a["createKeySpecForSec1Ec()"]
  769485d7_3d05_2a17_e40f_ab5969f3158b["isType()"]
  3ec5bf80_7c44_d0c9_be14_961b40d5ef6a -->|calls| 769485d7_3d05_2a17_e40f_ab5969f3158b
  8e95391a_e33e_a2ec_4af6_7d51fccc5224["getContents()"]
  3ec5bf80_7c44_d0c9_be14_961b40d5ef6a -->|calls| 8e95391a_e33e_a2ec_4af6_7d51fccc5224
  1192d76c_2cb5_4289_ead7_7175f0867445["createKeySpecForAlgorithm()"]
  3ec5bf80_7c44_d0c9_be14_961b40d5ef6a -->|calls| 1192d76c_2cb5_4289_ead7_7175f0867445
  2e5b1d95_473d_6851_9484_e54f96c7133f["getEcParameters()"]
  3ec5bf80_7c44_d0c9_be14_961b40d5ef6a -->|calls| 2e5b1d95_473d_6851_9484_e54f96c7133f
  49107b8c_e444_7ae5_a698_ba5067480277["of()"]
  3ec5bf80_7c44_d0c9_be14_961b40d5ef6a -->|calls| 49107b8c_e444_7ae5_a698_ba5067480277
  style 3ec5bf80_7c44_d0c9_be14_961b40d5ef6a fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

core/spring-boot/src/main/java/org/springframework/boot/ssl/pem/PemPrivateKeyParser.java lines 122–137

	private static PKCS8EncodedKeySpec createKeySpecForSec1Ec(byte[] bytes, @Nullable String password) {
		DerElement ecPrivateKey = DerElement.of(bytes);
		Assert.state(ecPrivateKey != null, "Unable to find private key");
		Assert.state(ecPrivateKey.isType(ValueType.ENCODED, TagType.SEQUENCE),
				"Key spec should be an ASN.1 encoded sequence");
		DerElement version = DerElement.of(ecPrivateKey.getContents());
		Assert.state(version != null && version.isType(ValueType.PRIMITIVE, TagType.INTEGER),
				"Key spec should start with version");
		Assert.state(version.getContents().remaining() == 1 && version.getContents().get() == 1,
				"Key spec version must be 1");
		DerElement privateKey = DerElement.of(ecPrivateKey.getContents());
		Assert.state(privateKey != null && privateKey.isType(ValueType.PRIMITIVE, TagType.OCTET_STRING),
				"Key spec should contain private key");
		DerElement parameters = DerElement.of(ecPrivateKey.getContents());
		return createKeySpecForAlgorithm(bytes, ELLIPTIC_CURVE_ALGORITHM, getEcParameters(parameters));
	}

Domain

Subdomains

Frequently Asked Questions

What does createKeySpecForSec1Ec() do?
createKeySpecForSec1Ec() is a function in the spring-boot codebase.
What does createKeySpecForSec1Ec() call?
createKeySpecForSec1Ec() calls 5 function(s): createKeySpecForAlgorithm, getContents, getEcParameters, isType, of.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free