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
  dd17c9cd_3bc1_02ee_542a_6fff495594fe["createKeySpecForSec1Ec()"]
  ed749d20_3b57_5c21_8f27_e679be9d1233["isType()"]
  dd17c9cd_3bc1_02ee_542a_6fff495594fe -->|calls| ed749d20_3b57_5c21_8f27_e679be9d1233
  e240e0f6_b4ee_a57c_4a0a_a603fa8cc7cb["getContents()"]
  dd17c9cd_3bc1_02ee_542a_6fff495594fe -->|calls| e240e0f6_b4ee_a57c_4a0a_a603fa8cc7cb
  e7565588_320b_7a29_22b7_a11cc86051d6["createKeySpecForAlgorithm()"]
  dd17c9cd_3bc1_02ee_542a_6fff495594fe -->|calls| e7565588_320b_7a29_22b7_a11cc86051d6
  0737bff0_077d_deae_8541_a509c780c967["getEcParameters()"]
  dd17c9cd_3bc1_02ee_542a_6fff495594fe -->|calls| 0737bff0_077d_deae_8541_a509c780c967
  5400b146_9639_7c2b_1f4c_7ea4047bfee9["of()"]
  dd17c9cd_3bc1_02ee_542a_6fff495594fe -->|calls| 5400b146_9639_7c2b_1f4c_7ea4047bfee9
  style dd17c9cd_3bc1_02ee_542a_6fff495594fe fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

buildpack/spring-boot-buildpack-platform/src/main/java/org/springframework/boot/buildpack/platform/docker/ssl/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));
	}

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