Class JdkSha256HexIdGenerator
java.lang.Object
org.springframework.ai.document.id.JdkSha256HexIdGenerator
- All Implemented Interfaces:
IdGenerator
A SHA-256 based ID generator that returns the hash as a UUID.
- Author:
- Aliakbar Jafarpour, Christian Tzolov
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongenerateId
(Object... contents) Generate a unique ID for the given content.
-
Constructor Details
-
JdkSha256HexIdGenerator
-
JdkSha256HexIdGenerator
public JdkSha256HexIdGenerator()
-
-
Method Details
-
generateId
Description copied from interface:IdGenerator
Generate a unique ID for the given content. Note: some generator, such as the the random generator might not dependant on or use the content parameters.- Specified by:
generateId
in interfaceIdGenerator
- Parameters:
contents
- the content to generate an ID for.- Returns:
- the generated ID.
-