Class TraceTestKeys
java.lang.Object
io.jans.lock.trace.crypto.bc.testkit.TraceTestKeys
Test-only Ed25519 helpers shared by the whole TRACE test suite: provider installation, key
generation, deterministic keys from RFC 8032 seeds, signing, and RFC 8037 JWK export of public
keys (consolidated test kit).
-
Method Summary
Modifier and TypeMethodDescriptionstatic KeyPairstatic byte[]static voidInstalls the BouncyCastle provider throughSecurityProviderUtilityunless a previous test class already did.static PrivateKeyprivateKeyFromSeed(byte[] seed) static Providerprovider()static PublicKeypublicKeyFromRaw(byte[] raw) static byte[]rawPublicKey(PublicKey publicKey) static byte[]sign(PrivateKey privateKey, byte[] message)
-
Method Details
-
installProvider
public static void installProvider()Installs the BouncyCastle provider throughSecurityProviderUtilityunless a previous test class already did. Call from@BeforeAll. -
provider
-
generateKeyPair
-
privateKeyFromSeed
- Parameters:
seed- the 32-byte RFC 8032 secret key (seed)
-
publicKeyFromRaw
-
sign
-
rawPublicKey
- Returns:
- the raw 32-byte key extracted from the provider's SubjectPublicKeyInfo encoding
-
toJwk
- Returns:
{"kty":"OKP","crv":"Ed25519","x":"<raw key, base64url>"}(RFC 8037 ยง2)
-
hex
-