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

generateHash() — spring-boot Function Reference

Architecture documentation for the generateHash() function in ApplicationTemp.java from the spring-boot codebase.

Function java GradlePlugin DslExtensions calls 2 called by 1

Entity Profile

Dependency Diagram

graph TD
  4ec78a43_4496_e91d_e223_0c927f3bba0f["generateHash()"]
  81ec2a39_142f_c8da_ba59_f78d88ebf3ad["getPath()"]
  81ec2a39_142f_c8da_ba59_f78d88ebf3ad -->|calls| 4ec78a43_4496_e91d_e223_0c927f3bba0f
  beda7275_e81c_f78d_d1d2_ff67d74b2253["update()"]
  4ec78a43_4496_e91d_e223_0c927f3bba0f -->|calls| beda7275_e81c_f78d_d1d2_ff67d74b2253
  a9650f9d_9e14_c324_a00f_0fb4d5aadd61["getDir()"]
  4ec78a43_4496_e91d_e223_0c927f3bba0f -->|calls| a9650f9d_9e14_c324_a00f_0fb4d5aadd61
  style 4ec78a43_4496_e91d_e223_0c927f3bba0f fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

core/spring-boot/src/main/java/org/springframework/boot/system/ApplicationTemp.java lines 145–164

	private byte[] generateHash(@Nullable Class<?> sourceClass) {
		ApplicationHome home = new ApplicationHome(sourceClass);
		MessageDigest digest;
		try {
			digest = MessageDigest.getInstance("SHA-1");
			update(digest, home.getSource());
			update(digest, home.getDir());
			update(digest, System.getProperty("user.dir"));
			if (!NativeDetector.inNativeImage()) {
				update(digest, System.getProperty("java.home"));
			}
			update(digest, System.getProperty("java.class.path"));
			update(digest, System.getProperty("sun.java.command"));
			update(digest, System.getProperty("sun.boot.class.path"));
			return digest.digest();
		}
		catch (Exception ex) {
			throw new IllegalStateException(ex);
		}
	}

Domain

Subdomains

Calls

Called By

Frequently Asked Questions

What does generateHash() do?
generateHash() is a function in the spring-boot codebase.
What does generateHash() call?
generateHash() calls 2 function(s): getDir, update.
What calls generateHash()?
generateHash() is called by 1 function(s): getPath.

Analyze Your Own Codebase

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

Try Supermodel Free