Class NativeTraceCryptoProvider
java.lang.Object
io.jans.lock.trace.crypto.tracecore.NativeTraceCryptoProvider
- All Implemented Interfaces:
TraceCryptoProvider
@ApplicationScoped
public class NativeTraceCryptoProvider
extends Object
implements TraceCryptoProvider
TraceCryptoProviderType.NATIVE implementation of TraceCryptoProvider: JCS,
Ed25519, content digest and receipt hash all come from jans-trace-core through the
jans-trace-java binding.
Lock's Jackson parser is the only enforcer of the request limits. The limits handed to the native library are at least twice the Lock values, so a body Lock accepted is never rejected here.
A library that does not load surfaces as an Error; the probe records it and every
operation then fails closed with crypto_unavailable.
- Author:
- Yuriy Movchan
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncanonicalize(com.fasterxml.jackson.databind.JsonNode node) describe()booleanvoidprobe()Builds the native limits and runs the library self-test.receiptHash(String domainId, long receiptSequence, long receivedAtMs, String producerId, String recordId, String contentDigest, String prevReceiptHash) voidtype()verifyAndDigest(TraceSignedRecord record, byte[] signature, TraceVerificationKey key)
-
Constructor Details
-
NativeTraceCryptoProvider
public NativeTraceCryptoProvider() -
NativeTraceCryptoProvider
-
-
Method Details
-
probe
@PostConstruct public void probe()Builds the native limits and runs the library self-test. Never throws: any failure, including a library loadError, leaves the provider unavailable. -
type
- Specified by:
typein interfaceTraceCryptoProvider
-
requireAvailable
public void requireAvailable()- Specified by:
requireAvailablein interfaceTraceCryptoProvider
-
isAvailable
public boolean isAvailable()- Specified by:
isAvailablein interfaceTraceCryptoProvider
-
describe
- Specified by:
describein interfaceTraceCryptoProvider
-
canonicalize
- Specified by:
canonicalizein interfaceTraceCryptoProvider
-
parseKey
- Specified by:
parseKeyin interfaceTraceCryptoProvider
-
verifyAndDigest
- Specified by:
verifyAndDigestin interfaceTraceCryptoProvider
-
receiptHash
public String receiptHash(String domainId, long receiptSequence, long receivedAtMs, String producerId, String recordId, String contentDigest, String prevReceiptHash) - Specified by:
receiptHashin interfaceTraceCryptoProvider
-