Class CryptoServiceClient
- All Implemented Interfaces:
AutoCloseable
try (CryptoServiceClient client = CryptoServiceClient.builder()
.baseUrl("http://127.0.0.1:3101")
.apiKey(System.getenv("CRYPTO_SERVICE_API_KEY"))
.build()) {
HashResult hash = client.hash(new HashRequest(HashAlgorithm.SHA256, "abc"));
CompletableFuture<HashResult> later =
client.hashAsync(new HashRequest(HashAlgorithm.BLAKE3, "x"));
}
Every operation has an asynchronous form, xxxAsync(...), returning a CompletableFuture, and a blocking form, xxx(...), that waits for it. Cancelling the
future (cancel(true)) aborts the HTTP exchange and any retry. Failures are an ApiError (the server answered outside 2xx; it carries the RFC 9457 Problem) or a TransportError (no usable answer).
Threads. A client is immutable after CryptoServiceClient.Builder.build() and safe to share between
any number of threads; it holds one pooled HttpClient (HTTP/2 where the server offers it,
keep-alive connections), so build one per server and reuse it. The blocking forms park the
calling thread in CompletableFuture.get(), so they suit virtual threads (Java 21): a
virtual thread per call costs no platform thread while it waits.
Security. Redirects are never followed (a 3xx is an ApiError), so credentials
cannot leak to another origin. TLS uses the JVM's default trust store and hostname verification;
the SDK has no option to turn either off. Credentials, keys, plaintexts and bodies never appear
in exception messages or in any toString.
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionList supported algorithms:GET /v2/algorithms; waits foralgorithmsAsync.List supported algorithms:GET /v2/algorithms.static CryptoServiceClient.Builderbuilder()Starts a builder;CryptoServiceClient.Builder.baseUrlis required.voidclose()Stops accepting calls and, when the client created its ownHttpClient, closes it (on Java 21 and later, whereHttpClientisAutoCloseable; on Java 17 its threads end once it is unreachable).decrypt(DecryptRequest request) Decrypt with XChaCha20-Poly1305:POST /v2/decrypt; waits fordecryptAsync.decryptAsync(DecryptRequest request) Decrypt with XChaCha20-Poly1305:POST /v2/decrypt.deleteKey(KeyIdRequest request) Delete a server-held key:POST /v2/keys/delete; waits fordeleteKeyAsync.deleteKeyAsync(KeyIdRequest request) Delete a server-held key:POST /v2/keys/delete.encrypt(EncryptRequest request) Encrypt with XChaCha20-Poly1305:POST /v2/encrypt; waits forencryptAsync.encryptAsync(EncryptRequest request) Encrypt with XChaCha20-Poly1305:POST /v2/encrypt.exportKey(KeyIdRequest request) Export a server-held private key:POST /v2/keys/export; waits forexportKeyAsync.exportKeyAsync(KeyIdRequest request) Export a server-held private key:POST /v2/keys/export.Generate a server-held key pair for any supported algorithm:POST /v2/keys/generate, with every option left to the server's default; waits for the result.generateKeyPair(KeyGenerateRequest request) Generate a server-held key pair for any supported algorithm:POST /v2/keys/generate; waits forgenerateKeyPairAsync.Generate a server-held key pair for any supported algorithm:POST /v2/keys/generate, with every option left to the server's default.generateKeyPairAsync(KeyGenerateRequest request) Generate a server-held key pair for any supported algorithm:POST /v2/keys/generate.getCbom()Cryptographic Bill of Materials (CBOM) in CycloneDX 1.6 format:GET /v2/compliance/cbom; waits forgetCbomAsync.Cryptographic Bill of Materials (CBOM) in CycloneDX 1.6 format:GET /v2/compliance/cbom.DORA cryptographic inventory (self-assessment):GET /v2/compliance/dora; waits forgetDoraComplianceAsync.DORA cryptographic inventory (self-assessment):GET /v2/compliance/dora.hash(HashRequest request) Compute a cryptographic hash:POST /v2/hash; waits forhashAsync.hashAsync(HashRequest request) Compute a cryptographic hash:POST /v2/hash.health()Health check:GET /health; waits forhealthAsync.Health check:GET /health.Generate a server-held HPKE key pair (classical or post-quantum hybrid):POST /v2/hpke/keygen, with every option left to the server's default; waits for the result.hpkeGenerateKeyPair(HpkeKeygenRequest request) Generate a server-held HPKE key pair (classical or post-quantum hybrid):POST /v2/hpke/keygen; waits forhpkeGenerateKeyPairAsync.Generate a server-held HPKE key pair (classical or post-quantum hybrid):POST /v2/hpke/keygen, with every option left to the server's default.Generate a server-held HPKE key pair (classical or post-quantum hybrid):POST /v2/hpke/keygen.hpkeOpen(HpkeOpenRequest request) Decrypt (open) an HPKE ciphertext with a server-held key:POST /v2/hpke/open; waits forhpkeOpenAsync.hpkeOpenAsync(HpkeOpenRequest request) Decrypt (open) an HPKE ciphertext with a server-held key:POST /v2/hpke/open.hpkeSeal(HpkeSealRequest request) Encrypt (seal) a message using HPKE (RFC 9180):POST /v2/hpke/seal; waits forhpkeSealAsync.hpkeSealAsync(HpkeSealRequest request) Encrypt (seal) a message using HPKE (RFC 9180):POST /v2/hpke/seal.iso20022Verify(Iso20022VerifyRequest request) Verify ISO 20022 post-quantum dual-signature envelope:POST /v2/stream/iso20022; waits foriso20022VerifyAsync.iso20022VerifyAsync(Iso20022VerifyRequest request) Verify ISO 20022 post-quantum dual-signature envelope:POST /v2/stream/iso20022.kdf(KdfRequest request) Derive a key from a password:POST /v2/kdf; waits forkdfAsync.kdfAsync(KdfRequest request) Derive a key from a password:POST /v2/kdf.keyUnwrap(KeyUnwrapRequest request) Unwrap a key using AES-KW or AES-KWP (RFC 3394/5649):POST /v2/keys/unwrap; waits forkeyUnwrapAsync.keyUnwrapAsync(KeyUnwrapRequest request) Unwrap a key using AES-KW or AES-KWP (RFC 3394/5649):POST /v2/keys/unwrap.keyWrap(KeyWrapRequest request) Wrap a key using AES-KW or AES-KWP (RFC 3394/5649):POST /v2/keys/wrap; waits forkeyWrapAsync.keyWrapAsync(KeyWrapRequest request) Wrap a key using AES-KW or AES-KWP (RFC 3394/5649):POST /v2/keys/wrap.Create a managed key in the designated KMS provider:POST /v2/kms/create-key, with every option left to the server's default; waits for the result.kmsCreateKey(KmsCreateKeyRequest request) Create a managed key in the designated KMS provider:POST /v2/kms/create-key; waits forkmsCreateKeyAsync.Create a managed key in the designated KMS provider:POST /v2/kms/create-key, with every option left to the server's default.kmsCreateKeyAsync(KmsCreateKeyRequest request) Create a managed key in the designated KMS provider:POST /v2/kms/create-key.kmsDecrypt(KmsDecryptRequest request) Decrypt ciphertext with a managed KMS key:POST /v2/kms/decrypt; waits forkmsDecryptAsync.kmsDecryptAsync(KmsDecryptRequest request) Decrypt ciphertext with a managed KMS key:POST /v2/kms/decrypt.kmsEncrypt(KmsEncryptRequest request) Encrypt plaintext with a managed KMS key:POST /v2/kms/encrypt; waits forkmsEncryptAsync.kmsEncryptAsync(KmsEncryptRequest request) Encrypt plaintext with a managed KMS key:POST /v2/kms/encrypt.Generate a Data Encryption Key (DEK) via KMS provider:POST /v2/kms/generate-data-key; waits forkmsGenerateDataKeyAsync.Generate a Data Encryption Key (DEK) via KMS provider:POST /v2/kms/generate-data-key.kmsUnwrap(KmsUnwrapRequest request) Unwrap a wrapped key using a managed KMS key:POST /v2/kms/unwrap; waits forkmsUnwrapAsync.kmsUnwrapAsync(KmsUnwrapRequest request) Unwrap a wrapped key using a managed KMS key:POST /v2/kms/unwrap.kmsWrap(KmsWrapRequest request) Wrap an existing key using a managed KMS key:POST /v2/kms/wrap; waits forkmsWrapAsync.kmsWrapAsync(KmsWrapRequest request) Wrap an existing key using a managed KMS key:POST /v2/kms/wrap.live()Liveness probe:GET /live; waits forliveAsync.Liveness probe:GET /live.mac(MacRequest request) Compute an HMAC:POST /v2/hmac; waits formacAsync.macAsync(MacRequest request) Compute an HMAC:POST /v2/hmac.macVerify(MacVerifyRequest request) Verify an HMAC:POST /v2/hmac/verify; waits formacVerifyAsync.macVerifyAsync(MacVerifyRequest request) Verify an HMAC:POST /v2/hmac/verify.mlKemDecapsulate(MlKemDecapsulateRequest request) ML-KEM decapsulate:POST /v2/pq/decapsulate; waits formlKemDecapsulateAsync.ML-KEM decapsulate:POST /v2/pq/decapsulate.mlKemEncapsulate(MlKemEncapsulateRequest request) ML-KEM encapsulate:POST /v2/pq/encapsulate; waits formlKemEncapsulateAsync.ML-KEM encapsulate:POST /v2/pq/encapsulate.Generate a server-held ML-KEM-768 key pair:POST /v2/pq/keygen; waits formlKemGenerateKeyPairAsync.Generate a server-held ML-KEM-768 key pair:POST /v2/pq/keygen.Encrypt for multiple recipients (hybrid key wrapping):POST /v2/multi-recipient/encrypt; waits formultiRecipientEncryptAsync.Encrypt for multiple recipients (hybrid key wrapping):POST /v2/multi-recipient/encrypt.Finish OPAQUE login handshake:POST /v2/opaque/login/finish; waits foropaqueLoginFinishAsync.Finish OPAQUE login handshake:POST /v2/opaque/login/finish.opaqueLoginInit(OpaqueLoginInitRequest request) Initiate OPAQUE login handshake:POST /v2/opaque/login/init; waits foropaqueLoginInitAsync.Initiate OPAQUE login handshake:POST /v2/opaque/login/init.Finish OPAQUE credential registration:POST /v2/opaque/register/finish; waits foropaqueRegisterFinishAsync.Finish OPAQUE credential registration:POST /v2/opaque/register/finish.Initiate OPAQUE credential registration:POST /v2/opaque/register/init; waits foropaqueRegisterInitAsync.Initiate OPAQUE credential registration:POST /v2/opaque/register/init.passwordDecrypt(PasswordDecryptRequest request) Decrypt with password (Argon2id + XChaCha20-Poly1305):POST /v2/password/decrypt; waits forpasswordDecryptAsync.Decrypt with password (Argon2id + XChaCha20-Poly1305):POST /v2/password/decrypt.passwordEncrypt(PasswordEncryptRequest request) Encrypt with password (Argon2id + XChaCha20-Poly1305):POST /v2/password/encrypt; waits forpasswordEncryptAsync.Encrypt with password (Argon2id + XChaCha20-Poly1305):POST /v2/password/encrypt.passwordHash(PasswordHashRequest request) Hash a password with Argon2id:POST /v2/password/hash; waits forpasswordHashAsync.passwordHashAsync(PasswordHashRequest request) Hash a password with Argon2id:POST /v2/password/hash.passwordVerify(PasswordVerifyRequest request) Verify a password against an Argon2id hash:POST /v2/password/verify; waits forpasswordVerifyAsync.passwordVerifyAsync(PasswordVerifyRequest request) Verify a password against an Argon2id hash:POST /v2/password/verify.pqDecapsulate(HybridDecapsulateRequest request) Hybrid decapsulate (X25519 + ML-KEM-768):POST /v2/pq/hybrid/decapsulate; waits forpqDecapsulateAsync.Hybrid decapsulate (X25519 + ML-KEM-768):POST /v2/pq/hybrid/decapsulate.pqEncapsulate(HybridEncapsulateRequest request) Hybrid encapsulate (X25519 + ML-KEM-768):POST /v2/pq/hybrid/encapsulate; waits forpqEncapsulateAsync.Hybrid encapsulate (X25519 + ML-KEM-768):POST /v2/pq/hybrid/encapsulate.Generate a server-held hybrid X25519 + ML-KEM-768 key pair:POST /v2/pq/hybrid/keygen; waits forpqGenerateKeyPairAsync.Generate a server-held hybrid X25519 + ML-KEM-768 key pair:POST /v2/pq/hybrid/keygen.pqHashSign(SignRequest request) Sign with SLH-DSA (FIPS 205):POST /v2/pq/slh-dsa/sign; waits forpqHashSignAsync.pqHashSignAsync(SignRequest request) Sign with SLH-DSA (FIPS 205):POST /v2/pq/slh-dsa/sign.pqHashSignKeygen(SlhDsaKeygenRequest request) Generate a server-held SLH-DSA key pair (FIPS 205):POST /v2/pq/slh-dsa/keygen; waits forpqHashSignKeygenAsync.pqHashSignKeygenAsync(SlhDsaKeygenRequest request) Generate a server-held SLH-DSA key pair (FIPS 205):POST /v2/pq/slh-dsa/keygen.pqHashVerify(SlhDsaVerifyRequest request) Verify with SLH-DSA (FIPS 205):POST /v2/pq/slh-dsa/verify; waits forpqHashVerifyAsync.pqHashVerifyAsync(SlhDsaVerifyRequest request) Verify with SLH-DSA (FIPS 205):POST /v2/pq/slh-dsa/verify.pqSign(SignRequest request) Sign with ML-DSA (FIPS 204):POST /v2/pq/dsa/sign; waits forpqSignAsync.pqSignAsync(SignRequest request) Sign with ML-DSA (FIPS 204):POST /v2/pq/dsa/sign.pqSignKeygen(MlDsaKeygenRequest request) Generate a server-held ML-DSA key pair (FIPS 204):POST /v2/pq/dsa/keygen; waits forpqSignKeygenAsync.pqSignKeygenAsync(MlDsaKeygenRequest request) Generate a server-held ML-DSA key pair (FIPS 204):POST /v2/pq/dsa/keygen.pqVerify(MlDsaVerifyRequest request) Verify with ML-DSA (FIPS 204):POST /v2/pq/dsa/verify; waits forpqVerifyAsync.pqVerifyAsync(MlDsaVerifyRequest request) Verify with ML-DSA (FIPS 204):POST /v2/pq/dsa/verify.ready()Readiness probe:GET /ready; waits forreadyAsync.Readiness probe:GET /ready.Sends one request and waits for the answer; seerequestAsync.requestAsync(String method, String path, byte[] body, String contentType) Sends one request to any path and returns the answer whatever its status: the escape hatch for routes the typed methods do not cover (for example the deprecated v1 routes or/metrics).sealedboxOpen(SealedboxOpenRequest request) Decrypt an anonymous sealed box (X25519):POST /v2/sealedbox/open; waits forsealedboxOpenAsync.sealedboxOpenAsync(SealedboxOpenRequest request) Decrypt an anonymous sealed box (X25519):POST /v2/sealedbox/open.sealedboxOpenPq(SealedboxOpenRequest request) Decrypt a post-quantum sealed box (X25519 + ML-KEM-768):POST /v2/sealedbox/open-pq; waits forsealedboxOpenPqAsync.sealedboxOpenPqAsync(SealedboxOpenRequest request) Decrypt a post-quantum sealed box (X25519 + ML-KEM-768):POST /v2/sealedbox/open-pq.sealedboxSeal(SealedboxSealRequest request) Anonymous public-key encryption (X25519 sealed box):POST /v2/sealedbox/seal; waits forsealedboxSealAsync.sealedboxSealAsync(SealedboxSealRequest request) Anonymous public-key encryption (X25519 sealed box):POST /v2/sealedbox/seal.sealedboxSealPq(SealedboxSealPqRequest request) Post-quantum anonymous encryption (X25519 + ML-KEM-768 sealed box):POST /v2/sealedbox/seal-pq; waits forsealedboxSealPqAsync.Post-quantum anonymous encryption (X25519 + ML-KEM-768 sealed box):POST /v2/sealedbox/seal-pq.secretboxOpen(SecretboxOpenRequest request) Decrypt with XChaCha20-Poly1305 (secretbox open):POST /v2/secretbox/open; waits forsecretboxOpenAsync.secretboxOpenAsync(SecretboxOpenRequest request) Decrypt with XChaCha20-Poly1305 (secretbox open):POST /v2/secretbox/open.secretboxSeal(SecretboxSealRequest request) Encrypt with XChaCha20-Poly1305 (secretbox seal):POST /v2/secretbox/seal; waits forsecretboxSealAsync.secretboxSealAsync(SecretboxSealRequest request) Encrypt with XChaCha20-Poly1305 (secretbox seal):POST /v2/secretbox/seal.Service metadata:GET /; waits forserviceInfoAsync.Service metadata:GET /.sign(SignRequest request) Sign with Ed25519:POST /v2/sign; waits forsignAsync.signAsync(SignRequest request) Sign with Ed25519:POST /v2/sign.Decrypt multi-recipient stream with server-held hybrid post-quantum key:POST /v2/stream/multi-pq-decrypt; waits forstreamMultiPqDecryptAsync.Decrypt multi-recipient stream with server-held hybrid post-quantum key:POST /v2/stream/multi-pq-decrypt.Encrypt stream for multiple recipients with hybrid post-quantum AEAD:POST /v2/stream/multi-pq-encrypt; waits forstreamMultiPqEncryptAsync.Encrypt stream for multiple recipients with hybrid post-quantum AEAD:POST /v2/stream/multi-pq-encrypt.streamPqDecrypt(StreamPqDecryptRequest request) Decrypt stream with server-held hybrid post-quantum key:POST /v2/stream/pq-decrypt; waits forstreamPqDecryptAsync.Decrypt stream with server-held hybrid post-quantum key:POST /v2/stream/pq-decrypt.streamPqEncrypt(StreamPqEncryptRequest request) Encrypt stream with hybrid post-quantum AEAD:POST /v2/stream/pq-encrypt; waits forstreamPqEncryptAsync.Encrypt stream with hybrid post-quantum AEAD:POST /v2/stream/pq-encrypt.streamSign(StreamSignRequest request) Batch sign messages with sub-millisecond throughput:POST /v2/stream/sign; waits forstreamSignAsync.streamSignAsync(StreamSignRequest request) Batch sign messages with sub-millisecond throughput:POST /v2/stream/sign.streamVerify(StreamVerifyRequest request) Batch verify digital signatures:POST /v2/stream/verify; waits forstreamVerifyAsync.streamVerifyAsync(StreamVerifyRequest request) Batch verify digital signatures:POST /v2/stream/verify.verify(VerifyRequest request) Verify an Ed25519 signature:POST /v2/verify; waits forverifyAsync.verifyAsync(VerifyRequest request) Verify an Ed25519 signature:POST /v2/verify.
-
Field Details
-
VERSION
This SDK's version, sent asUser-Agent: crypto-service-sdk-java/<version>.- See Also:
-
-
Method Details
-
builder
Starts a builder;CryptoServiceClient.Builder.baseUrlis required.- Returns:
- a new builder with the defaults
-
requestAsync
public CompletableFuture<RawResponse> requestAsync(String method, String path, byte[] body, String contentType) Sends one request to any path and returns the answer whatever its status: the escape hatch for routes the typed methods do not cover (for example the deprecated v1 routes or/metrics). Credentials, the timeout, the deadline, retries and tracing apply as for typed calls.- Parameters:
method- the HTTP method, for examplePOSTpath- the path below the base URL, starting with/body- the body, or null to send nonecontentType- the body's media type, or null forapplication/json- Returns:
- a future completed with the response, or exceptionally with a
TransportError - Throws:
IllegalArgumentException- when the path does not start with/
-
request
Sends one request and waits for the answer; seerequestAsync.- Parameters:
method- the HTTP method, for examplePOSTpath- the path below the base URL, starting with/body- the body, or null to send nonecontentType- the body's media type, or null forapplication/json- Returns:
- the response, whatever its status
- Throws:
TransportError- when no response arrives
-
close
public void close()Stops accepting calls and, when the client created its ownHttpClient, closes it (on Java 21 and later, whereHttpClientisAutoCloseable; on Java 17 its threads end once it is unreachable). An injectedHttpClientis left open. Idempotent.- Specified by:
closein interfaceAutoCloseable
-
healthAsync
Health check:GET /health.A public route: the client sends no credentials.
- Returns:
- a future completed with the result, or exceptionally with an
ApiErroror aTransportError
-
health
Health check:GET /health; waits forhealthAsync.- Returns:
- the result
- Throws:
ApiError- when the server answers with an error statusTransportError- when no usable response arrives
-
liveAsync
Liveness probe:GET /live.A public route: the client sends no credentials.
- Returns:
- a future completed with the result, or exceptionally with an
ApiErroror aTransportError
-
live
Liveness probe:GET /live; waits forliveAsync.- Returns:
- the result
- Throws:
ApiError- when the server answers with an error statusTransportError- when no usable response arrives
-
readyAsync
Readiness probe:GET /ready.A public route: the client sends no credentials.
- Returns:
- a future completed with the result, or exceptionally with an
ApiErroror aTransportError
-
ready
Readiness probe:GET /ready; waits forreadyAsync.- Returns:
- the result
- Throws:
ApiError- when the server answers with an error statusTransportError- when no usable response arrives
-
serviceInfoAsync
Service metadata:GET /.- Returns:
- a future completed with the result, or exceptionally with an
ApiErroror aTransportError
-
serviceInfo
Service metadata:GET /; waits forserviceInfoAsync.- Returns:
- the result
- Throws:
ApiError- when the server answers with an error statusTransportError- when no usable response arrives
-
algorithmsAsync
List supported algorithms:GET /v2/algorithms.- Returns:
- a future completed with the algorithm names, by category, or exceptionally with an
ApiErroror aTransportError
-
algorithms
List supported algorithms:GET /v2/algorithms; waits foralgorithmsAsync.- Returns:
- the algorithm names, by category
- Throws:
ApiError- when the server answers with an error statusTransportError- when no usable response arrives
-
getCbomAsync
Cryptographic Bill of Materials (CBOM) in CycloneDX 1.6 format:GET /v2/compliance/cbom.- Returns:
- a future completed with the result, or exceptionally with an
ApiErroror aTransportError
-
getCbom
Cryptographic Bill of Materials (CBOM) in CycloneDX 1.6 format:GET /v2/compliance/cbom; waits forgetCbomAsync.- Returns:
- the result
- Throws:
ApiError- when the server answers with an error statusTransportError- when no usable response arrives
-
getDoraComplianceAsync
DORA cryptographic inventory (self-assessment):GET /v2/compliance/dora.- Returns:
- a future completed with the result, or exceptionally with an
ApiErroror aTransportError
-
getDoraCompliance
DORA cryptographic inventory (self-assessment):GET /v2/compliance/dora; waits forgetDoraComplianceAsync.- Returns:
- the result
- Throws:
ApiError- when the server answers with an error statusTransportError- when no usable response arrives
-
kmsCreateKeyAsync
Create a managed key in the designated KMS provider:POST /v2/kms/create-key.Needs the scope
crypto:keys.- Parameters:
request- the request body- Returns:
- a future completed with the result, or exceptionally with an
ApiErroror aTransportError
-
kmsCreateKey
Create a managed key in the designated KMS provider:POST /v2/kms/create-key; waits forkmsCreateKeyAsync.- Parameters:
request- the request body- Returns:
- the result
- Throws:
ApiError- when the server answers with an error statusTransportError- when no usable response arrives
-
kmsCreateKeyAsync
Create a managed key in the designated KMS provider:POST /v2/kms/create-key, with every option left to the server's default.- Returns:
- a future completed with the result
-
kmsCreateKey
Create a managed key in the designated KMS provider:POST /v2/kms/create-key, with every option left to the server's default; waits for the result.- Returns:
- the result
- Throws:
ApiError- when the server answers with an error statusTransportError- when no usable response arrives
-
kmsWrapAsync
Wrap an existing key using a managed KMS key:POST /v2/kms/wrap.Needs the scope
crypto:keys.- Parameters:
request- the request body- Returns:
- a future completed with the result, or exceptionally with an
ApiErroror aTransportError
-
kmsWrap
Wrap an existing key using a managed KMS key:POST /v2/kms/wrap; waits forkmsWrapAsync.- Parameters:
request- the request body- Returns:
- the result
- Throws:
ApiError- when the server answers with an error statusTransportError- when no usable response arrives
-
kmsUnwrapAsync
Unwrap a wrapped key using a managed KMS key:POST /v2/kms/unwrap.Needs the scope
crypto:keys.- Parameters:
request- the request body- Returns:
- a future completed with the result, or exceptionally with an
ApiErroror aTransportError
-
kmsUnwrap
Unwrap a wrapped key using a managed KMS key:POST /v2/kms/unwrap; waits forkmsUnwrapAsync.- Parameters:
request- the request body- Returns:
- the result
- Throws:
ApiError- when the server answers with an error statusTransportError- when no usable response arrives
-
kmsGenerateDataKeyAsync
Generate a Data Encryption Key (DEK) via KMS provider:POST /v2/kms/generate-data-key.Needs the scope
crypto:keys.- Parameters:
request- the request body- Returns:
- a future completed with the result, or exceptionally with an
ApiErroror aTransportError
-
kmsGenerateDataKey
Generate a Data Encryption Key (DEK) via KMS provider:POST /v2/kms/generate-data-key; waits forkmsGenerateDataKeyAsync.- Parameters:
request- the request body- Returns:
- the result
- Throws:
ApiError- when the server answers with an error statusTransportError- when no usable response arrives
-
kmsEncryptAsync
Encrypt plaintext with a managed KMS key:POST /v2/kms/encrypt.Needs the scope
crypto:encrypt.- Parameters:
request- the request body- Returns:
- a future completed with the result, or exceptionally with an
ApiErroror aTransportError
-
kmsEncrypt
Encrypt plaintext with a managed KMS key:POST /v2/kms/encrypt; waits forkmsEncryptAsync.- Parameters:
request- the request body- Returns:
- the result
- Throws:
ApiError- when the server answers with an error statusTransportError- when no usable response arrives
-
kmsDecryptAsync
Decrypt ciphertext with a managed KMS key:POST /v2/kms/decrypt.Needs the scope
crypto:decrypt.- Parameters:
request- the request body- Returns:
- a future completed with the result, or exceptionally with an
ApiErroror aTransportError
-
kmsDecrypt
Decrypt ciphertext with a managed KMS key:POST /v2/kms/decrypt; waits forkmsDecryptAsync.- Parameters:
request- the request body- Returns:
- the result
- Throws:
ApiError- when the server answers with an error statusTransportError- when no usable response arrives
-
opaqueRegisterInitAsync
public CompletableFuture<OpaqueRegisterInitResult> opaqueRegisterInitAsync(OpaqueRegisterInitRequest request) Initiate OPAQUE credential registration:POST /v2/opaque/register/init.- Parameters:
request- the request body- Returns:
- a future completed with the result, or exceptionally with an
ApiErroror aTransportError
-
opaqueRegisterInit
Initiate OPAQUE credential registration:POST /v2/opaque/register/init; waits foropaqueRegisterInitAsync.- Parameters:
request- the request body- Returns:
- the result
- Throws:
ApiError- when the server answers with an error statusTransportError- when no usable response arrives
-
opaqueRegisterFinishAsync
public CompletableFuture<OpaqueRegisterFinishResult> opaqueRegisterFinishAsync(OpaqueRegisterFinishRequest request) Finish OPAQUE credential registration:POST /v2/opaque/register/finish.- Parameters:
request- the request body- Returns:
- a future completed with the result, or exceptionally with an
ApiErroror aTransportError
-
opaqueRegisterFinish
Finish OPAQUE credential registration:POST /v2/opaque/register/finish; waits foropaqueRegisterFinishAsync.- Parameters:
request- the request body- Returns:
- the result
- Throws:
ApiError- when the server answers with an error statusTransportError- when no usable response arrives
-
opaqueLoginInitAsync
public CompletableFuture<OpaqueLoginInitResult> opaqueLoginInitAsync(OpaqueLoginInitRequest request) Initiate OPAQUE login handshake:POST /v2/opaque/login/init.A public route: the client sends no credentials.
- Parameters:
request- the request body- Returns:
- a future completed with the result, or exceptionally with an
ApiErroror aTransportError
-
opaqueLoginInit
Initiate OPAQUE login handshake:POST /v2/opaque/login/init; waits foropaqueLoginInitAsync.- Parameters:
request- the request body- Returns:
- the result
- Throws:
ApiError- when the server answers with an error statusTransportError- when no usable response arrives
-
opaqueLoginFinishAsync
public CompletableFuture<OpaqueLoginFinishResult> opaqueLoginFinishAsync(OpaqueLoginFinishRequest request) Finish OPAQUE login handshake:POST /v2/opaque/login/finish.A public route: the client sends no credentials.
- Parameters:
request- the request body- Returns:
- a future completed with the result, or exceptionally with an
ApiErroror aTransportError
-
opaqueLoginFinish
Finish OPAQUE login handshake:POST /v2/opaque/login/finish; waits foropaqueLoginFinishAsync.- Parameters:
request- the request body- Returns:
- the result
- Throws:
ApiError- when the server answers with an error statusTransportError- when no usable response arrives
-
streamPqEncryptAsync
public CompletableFuture<StreamPqEncryptResult> streamPqEncryptAsync(StreamPqEncryptRequest request) Encrypt stream with hybrid post-quantum AEAD:POST /v2/stream/pq-encrypt.Needs the scope
crypto:encrypt.- Parameters:
request- the request body- Returns:
- a future completed with the result, or exceptionally with an
ApiErroror aTransportError
-
streamPqEncrypt
Encrypt stream with hybrid post-quantum AEAD:POST /v2/stream/pq-encrypt; waits forstreamPqEncryptAsync.- Parameters:
request- the request body- Returns:
- the result
- Throws:
ApiError- when the server answers with an error statusTransportError- when no usable response arrives
-
streamPqDecryptAsync
public CompletableFuture<StreamPqDecryptResult> streamPqDecryptAsync(StreamPqDecryptRequest request) Decrypt stream with server-held hybrid post-quantum key:POST /v2/stream/pq-decrypt.Needs the scope
crypto:decrypt.- Parameters:
request- the request body- Returns:
- a future completed with the result, or exceptionally with an
ApiErroror aTransportError
-
streamPqDecrypt
Decrypt stream with server-held hybrid post-quantum key:POST /v2/stream/pq-decrypt; waits forstreamPqDecryptAsync.- Parameters:
request- the request body- Returns:
- the result
- Throws:
ApiError- when the server answers with an error statusTransportError- when no usable response arrives
-
streamMultiPqEncryptAsync
public CompletableFuture<StreamMultiPqEncryptResult> streamMultiPqEncryptAsync(StreamMultiPqEncryptRequest request) Encrypt stream for multiple recipients with hybrid post-quantum AEAD:POST /v2/stream/multi-pq-encrypt.Needs the scope
crypto:encrypt.- Parameters:
request- the request body- Returns:
- a future completed with the result, or exceptionally with an
ApiErroror aTransportError
-
streamMultiPqEncrypt
Encrypt stream for multiple recipients with hybrid post-quantum AEAD:POST /v2/stream/multi-pq-encrypt; waits forstreamMultiPqEncryptAsync.- Parameters:
request- the request body- Returns:
- the result
- Throws:
ApiError- when the server answers with an error statusTransportError- when no usable response arrives
-
streamMultiPqDecryptAsync
public CompletableFuture<StreamMultiPqDecryptResult> streamMultiPqDecryptAsync(StreamMultiPqDecryptRequest request) Decrypt multi-recipient stream with server-held hybrid post-quantum key:POST /v2/stream/multi-pq-decrypt.Needs the scope
crypto:decrypt.- Parameters:
request- the request body- Returns:
- a future completed with the result, or exceptionally with an
ApiErroror aTransportError
-
streamMultiPqDecrypt
Decrypt multi-recipient stream with server-held hybrid post-quantum key:POST /v2/stream/multi-pq-decrypt; waits forstreamMultiPqDecryptAsync.- Parameters:
request- the request body- Returns:
- the result
- Throws:
ApiError- when the server answers with an error statusTransportError- when no usable response arrives
-
iso20022VerifyAsync
Verify ISO 20022 post-quantum dual-signature envelope:POST /v2/stream/iso20022.Needs the scope
crypto:verify.- Parameters:
request- the request body- Returns:
- a future completed with the result, or exceptionally with an
ApiErroror aTransportError
-
iso20022Verify
Verify ISO 20022 post-quantum dual-signature envelope:POST /v2/stream/iso20022; waits foriso20022VerifyAsync.- Parameters:
request- the request body- Returns:
- the result
- Throws:
ApiError- when the server answers with an error statusTransportError- when no usable response arrives
-
hpkeGenerateKeyPairAsync
Generate a server-held HPKE key pair (classical or post-quantum hybrid):POST /v2/hpke/keygen.Needs the scope
crypto:keys.- Parameters:
request- the request body- Returns:
- a future completed with the result, or exceptionally with an
ApiErroror aTransportError
-
hpkeGenerateKeyPair
Generate a server-held HPKE key pair (classical or post-quantum hybrid):POST /v2/hpke/keygen; waits forhpkeGenerateKeyPairAsync.- Parameters:
request- the request body- Returns:
- the result
- Throws:
ApiError- when the server answers with an error statusTransportError- when no usable response arrives
-
hpkeGenerateKeyPairAsync
Generate a server-held HPKE key pair (classical or post-quantum hybrid):POST /v2/hpke/keygen, with every option left to the server's default.- Returns:
- a future completed with the result
-
hpkeGenerateKeyPair
Generate a server-held HPKE key pair (classical or post-quantum hybrid):POST /v2/hpke/keygen, with every option left to the server's default; waits for the result.- Returns:
- the result
- Throws:
ApiError- when the server answers with an error statusTransportError- when no usable response arrives
-
hpkeSealAsync
Encrypt (seal) a message using HPKE (RFC 9180):POST /v2/hpke/seal.Needs the scope
crypto:encrypt.- Parameters:
request- the request body- Returns:
- a future completed with the result, or exceptionally with an
ApiErroror aTransportError
-
hpkeSeal
Encrypt (seal) a message using HPKE (RFC 9180):POST /v2/hpke/seal; waits forhpkeSealAsync.- Parameters:
request- the request body- Returns:
- the result
- Throws:
ApiError- when the server answers with an error statusTransportError- when no usable response arrives
-
hpkeOpenAsync
Decrypt (open) an HPKE ciphertext with a server-held key:POST /v2/hpke/open.Needs the scope
crypto:decrypt.- Parameters:
request- the request body- Returns:
- a future completed with the result, or exceptionally with an
ApiErroror aTransportError
-
hpkeOpen
Decrypt (open) an HPKE ciphertext with a server-held key:POST /v2/hpke/open; waits forhpkeOpenAsync.- Parameters:
request- the request body- Returns:
- the result
- Throws:
ApiError- when the server answers with an error statusTransportError- when no usable response arrives
-
mlKemGenerateKeyPairAsync
Generate a server-held ML-KEM-768 key pair:POST /v2/pq/keygen.Needs the scope
crypto:keys.- Returns:
- a future completed with the result, or exceptionally with an
ApiErroror aTransportError
-
mlKemGenerateKeyPair
Generate a server-held ML-KEM-768 key pair:POST /v2/pq/keygen; waits formlKemGenerateKeyPairAsync.- Returns:
- the result
- Throws:
ApiError- when the server answers with an error statusTransportError- when no usable response arrives
-
mlKemEncapsulateAsync
public CompletableFuture<MlKemEncapsulateResult> mlKemEncapsulateAsync(MlKemEncapsulateRequest request) ML-KEM encapsulate:POST /v2/pq/encapsulate.Needs the scope
crypto:encrypt.- Parameters:
request- the request body- Returns:
- a future completed with the result, or exceptionally with an
ApiErroror aTransportError
-
mlKemEncapsulate
ML-KEM encapsulate:POST /v2/pq/encapsulate; waits formlKemEncapsulateAsync.- Parameters:
request- the request body- Returns:
- the result
- Throws:
ApiError- when the server answers with an error statusTransportError- when no usable response arrives
-
mlKemDecapsulateAsync
public CompletableFuture<KemDecapsulateResult> mlKemDecapsulateAsync(MlKemDecapsulateRequest request) ML-KEM decapsulate:POST /v2/pq/decapsulate.Needs the scope
crypto:decrypt.- Parameters:
request- the request body- Returns:
- a future completed with the result, or exceptionally with an
ApiErroror aTransportError
-
mlKemDecapsulate
ML-KEM decapsulate:POST /v2/pq/decapsulate; waits formlKemDecapsulateAsync.- Parameters:
request- the request body- Returns:
- the result
- Throws:
ApiError- when the server answers with an error statusTransportError- when no usable response arrives
-
pqGenerateKeyPairAsync
Generate a server-held hybrid X25519 + ML-KEM-768 key pair:POST /v2/pq/hybrid/keygen.Needs the scope
crypto:keys.- Returns:
- a future completed with the result, or exceptionally with an
ApiErroror aTransportError
-
pqGenerateKeyPair
Generate a server-held hybrid X25519 + ML-KEM-768 key pair:POST /v2/pq/hybrid/keygen; waits forpqGenerateKeyPairAsync.- Returns:
- the result
- Throws:
ApiError- when the server answers with an error statusTransportError- when no usable response arrives
-
pqEncapsulateAsync
public CompletableFuture<HybridEncapsulateResult> pqEncapsulateAsync(HybridEncapsulateRequest request) Hybrid encapsulate (X25519 + ML-KEM-768):POST /v2/pq/hybrid/encapsulate.Needs the scope
crypto:encrypt.- Parameters:
request- the request body- Returns:
- a future completed with the result, or exceptionally with an
ApiErroror aTransportError
-
pqEncapsulate
Hybrid encapsulate (X25519 + ML-KEM-768):POST /v2/pq/hybrid/encapsulate; waits forpqEncapsulateAsync.- Parameters:
request- the request body- Returns:
- the result
- Throws:
ApiError- when the server answers with an error statusTransportError- when no usable response arrives
-
pqDecapsulateAsync
public CompletableFuture<HybridDecapsulateResult> pqDecapsulateAsync(HybridDecapsulateRequest request) Hybrid decapsulate (X25519 + ML-KEM-768):POST /v2/pq/hybrid/decapsulate.Needs the scope
crypto:decrypt.- Parameters:
request- the request body- Returns:
- a future completed with the result, or exceptionally with an
ApiErroror aTransportError
-
pqDecapsulate
Hybrid decapsulate (X25519 + ML-KEM-768):POST /v2/pq/hybrid/decapsulate; waits forpqDecapsulateAsync.- Parameters:
request- the request body- Returns:
- the result
- Throws:
ApiError- when the server answers with an error statusTransportError- when no usable response arrives
-
pqSignKeygenAsync
Generate a server-held ML-DSA key pair (FIPS 204):POST /v2/pq/dsa/keygen.Needs the scope
crypto:keys.- Parameters:
request- the request body- Returns:
- a future completed with the result, or exceptionally with an
ApiErroror aTransportError
-
pqSignKeygen
Generate a server-held ML-DSA key pair (FIPS 204):POST /v2/pq/dsa/keygen; waits forpqSignKeygenAsync.- Parameters:
request- the request body- Returns:
- the result
- Throws:
ApiError- when the server answers with an error statusTransportError- when no usable response arrives
-
pqSignAsync
Sign with ML-DSA (FIPS 204):POST /v2/pq/dsa/sign.Needs the scope
crypto:sign.- Parameters:
request- the request body- Returns:
- a future completed with the result, or exceptionally with an
ApiErroror aTransportError
-
pqSign
Sign with ML-DSA (FIPS 204):POST /v2/pq/dsa/sign; waits forpqSignAsync.- Parameters:
request- the request body- Returns:
- the result
- Throws:
ApiError- when the server answers with an error statusTransportError- when no usable response arrives
-
pqVerifyAsync
Verify with ML-DSA (FIPS 204):POST /v2/pq/dsa/verify.Needs the scope
crypto:verify.- Parameters:
request- the request body- Returns:
- a future completed with the result, or exceptionally with an
ApiErroror aTransportError
-
pqVerify
Verify with ML-DSA (FIPS 204):POST /v2/pq/dsa/verify; waits forpqVerifyAsync.- Parameters:
request- the request body- Returns:
- the result
- Throws:
ApiError- when the server answers with an error statusTransportError- when no usable response arrives
-
pqHashSignKeygenAsync
Generate a server-held SLH-DSA key pair (FIPS 205):POST /v2/pq/slh-dsa/keygen.Needs the scope
crypto:keys.- Parameters:
request- the request body- Returns:
- a future completed with the result, or exceptionally with an
ApiErroror aTransportError
-
pqHashSignKeygen
Generate a server-held SLH-DSA key pair (FIPS 205):POST /v2/pq/slh-dsa/keygen; waits forpqHashSignKeygenAsync.- Parameters:
request- the request body- Returns:
- the result
- Throws:
ApiError- when the server answers with an error statusTransportError- when no usable response arrives
-
pqHashSignAsync
Sign with SLH-DSA (FIPS 205):POST /v2/pq/slh-dsa/sign.Needs the scope
crypto:sign.- Parameters:
request- the request body- Returns:
- a future completed with the result, or exceptionally with an
ApiErroror aTransportError
-
pqHashSign
Sign with SLH-DSA (FIPS 205):POST /v2/pq/slh-dsa/sign; waits forpqHashSignAsync.- Parameters:
request- the request body- Returns:
- the result
- Throws:
ApiError- when the server answers with an error statusTransportError- when no usable response arrives
-
pqHashVerifyAsync
Verify with SLH-DSA (FIPS 205):POST /v2/pq/slh-dsa/verify.Needs the scope
crypto:verify.- Parameters:
request- the request body- Returns:
- a future completed with the result, or exceptionally with an
ApiErroror aTransportError
-
pqHashVerify
Verify with SLH-DSA (FIPS 205):POST /v2/pq/slh-dsa/verify; waits forpqHashVerifyAsync.- Parameters:
request- the request body- Returns:
- the result
- Throws:
ApiError- when the server answers with an error statusTransportError- when no usable response arrives
-
generateKeyPairAsync
Generate a server-held key pair for any supported algorithm:POST /v2/keys/generate.Needs the scope
crypto:keys.- Parameters:
request- the request body- Returns:
- a future completed with the result, or exceptionally with an
ApiErroror aTransportError
-
generateKeyPair
Generate a server-held key pair for any supported algorithm:POST /v2/keys/generate; waits forgenerateKeyPairAsync.- Parameters:
request- the request body- Returns:
- the result
- Throws:
ApiError- when the server answers with an error statusTransportError- when no usable response arrives
-
generateKeyPairAsync
Generate a server-held key pair for any supported algorithm:POST /v2/keys/generate, with every option left to the server's default.- Returns:
- a future completed with the result
-
generateKeyPair
Generate a server-held key pair for any supported algorithm:POST /v2/keys/generate, with every option left to the server's default; waits for the result.- Returns:
- the result
- Throws:
ApiError- when the server answers with an error statusTransportError- when no usable response arrives
-
exportKeyAsync
Export a server-held private key:POST /v2/keys/export.Needs the scope
crypto:keys:export.- Parameters:
request- the request body- Returns:
- a future completed with the result, or exceptionally with an
ApiErroror aTransportError
-
exportKey
Export a server-held private key:POST /v2/keys/export; waits forexportKeyAsync.- Parameters:
request- the request body- Returns:
- the result
- Throws:
ApiError- when the server answers with an error statusTransportError- when no usable response arrives
-
deleteKeyAsync
Delete a server-held key:POST /v2/keys/delete.Needs the scope
crypto:keys.- Parameters:
request- the request body- Returns:
- a future completed with the result, or exceptionally with an
ApiErroror aTransportError
-
deleteKey
Delete a server-held key:POST /v2/keys/delete; waits fordeleteKeyAsync.- Parameters:
request- the request body- Returns:
- the result
- Throws:
ApiError- when the server answers with an error statusTransportError- when no usable response arrives
-
signAsync
Sign with Ed25519:POST /v2/sign.Needs the scope
crypto:sign.- Parameters:
request- the request body- Returns:
- a future completed with the result, or exceptionally with an
ApiErroror aTransportError
-
sign
Sign with Ed25519:POST /v2/sign; waits forsignAsync.- Parameters:
request- the request body- Returns:
- the result
- Throws:
ApiError- when the server answers with an error statusTransportError- when no usable response arrives
-
verifyAsync
Verify an Ed25519 signature:POST /v2/verify.Needs the scope
crypto:verify.- Parameters:
request- the request body- Returns:
- a future completed with the result, or exceptionally with an
ApiErroror aTransportError
-
verify
Verify an Ed25519 signature:POST /v2/verify; waits forverifyAsync.- Parameters:
request- the request body- Returns:
- the result
- Throws:
ApiError- when the server answers with an error statusTransportError- when no usable response arrives
-
streamSignAsync
Batch sign messages with sub-millisecond throughput:POST /v2/stream/sign.Needs the scope
crypto:sign.- Parameters:
request- the request body- Returns:
- a future completed with the result, or exceptionally with an
ApiErroror aTransportError
-
streamSign
Batch sign messages with sub-millisecond throughput:POST /v2/stream/sign; waits forstreamSignAsync.- Parameters:
request- the request body- Returns:
- the result
- Throws:
ApiError- when the server answers with an error statusTransportError- when no usable response arrives
-
streamVerifyAsync
Batch verify digital signatures:POST /v2/stream/verify.Needs the scope
crypto:verify.- Parameters:
request- the request body- Returns:
- a future completed with the result, or exceptionally with an
ApiErroror aTransportError
-
streamVerify
Batch verify digital signatures:POST /v2/stream/verify; waits forstreamVerifyAsync.- Parameters:
request- the request body- Returns:
- the result
- Throws:
ApiError- when the server answers with an error statusTransportError- when no usable response arrives
-
sealedboxSealAsync
Anonymous public-key encryption (X25519 sealed box):POST /v2/sealedbox/seal.Needs the scope
crypto:encrypt.- Parameters:
request- the request body- Returns:
- a future completed with the result, or exceptionally with an
ApiErroror aTransportError
-
sealedboxSeal
Anonymous public-key encryption (X25519 sealed box):POST /v2/sealedbox/seal; waits forsealedboxSealAsync.- Parameters:
request- the request body- Returns:
- the result
- Throws:
ApiError- when the server answers with an error statusTransportError- when no usable response arrives
-
sealedboxOpenAsync
Decrypt an anonymous sealed box (X25519):POST /v2/sealedbox/open.Needs the scope
crypto:decrypt.- Parameters:
request- the request body- Returns:
- a future completed with the plaintext as UTF-8 text, or exceptionally with an
ApiErroror aTransportError
-
sealedboxOpen
Decrypt an anonymous sealed box (X25519):POST /v2/sealedbox/open; waits forsealedboxOpenAsync.- Parameters:
request- the request body- Returns:
- the plaintext as UTF-8 text
- Throws:
ApiError- when the server answers with an error statusTransportError- when no usable response arrives
-
sealedboxSealPqAsync
Post-quantum anonymous encryption (X25519 + ML-KEM-768 sealed box):POST /v2/sealedbox/seal-pq.Needs the scope
crypto:encrypt.- Parameters:
request- the request body- Returns:
- a future completed with the result, or exceptionally with an
ApiErroror aTransportError
-
sealedboxSealPq
Post-quantum anonymous encryption (X25519 + ML-KEM-768 sealed box):POST /v2/sealedbox/seal-pq; waits forsealedboxSealPqAsync.- Parameters:
request- the request body- Returns:
- the result
- Throws:
ApiError- when the server answers with an error statusTransportError- when no usable response arrives
-
sealedboxOpenPqAsync
Decrypt a post-quantum sealed box (X25519 + ML-KEM-768):POST /v2/sealedbox/open-pq.Needs the scope
crypto:decrypt.- Parameters:
request- the request body- Returns:
- a future completed with the plaintext as UTF-8 text, or exceptionally with an
ApiErroror aTransportError
-
sealedboxOpenPq
Decrypt a post-quantum sealed box (X25519 + ML-KEM-768):POST /v2/sealedbox/open-pq; waits forsealedboxOpenPqAsync.- Parameters:
request- the request body- Returns:
- the plaintext as UTF-8 text
- Throws:
ApiError- when the server answers with an error statusTransportError- when no usable response arrives
-
multiRecipientEncryptAsync
public CompletableFuture<MultiRecipientResult> multiRecipientEncryptAsync(MultiRecipientEncryptRequest request) Encrypt for multiple recipients (hybrid key wrapping):POST /v2/multi-recipient/encrypt.Needs the scope
crypto:encrypt.- Parameters:
request- the request body- Returns:
- a future completed with the result, or exceptionally with an
ApiErroror aTransportError
-
multiRecipientEncrypt
Encrypt for multiple recipients (hybrid key wrapping):POST /v2/multi-recipient/encrypt; waits formultiRecipientEncryptAsync.- Parameters:
request- the request body- Returns:
- the result
- Throws:
ApiError- when the server answers with an error statusTransportError- when no usable response arrives
-
encryptAsync
Encrypt with XChaCha20-Poly1305:POST /v2/encrypt.Needs the scope
crypto:encrypt.- Parameters:
request- the request body- Returns:
- a future completed with the result, or exceptionally with an
ApiErroror aTransportError
-
encrypt
Encrypt with XChaCha20-Poly1305:POST /v2/encrypt; waits forencryptAsync.- Parameters:
request- the request body- Returns:
- the result
- Throws:
ApiError- when the server answers with an error statusTransportError- when no usable response arrives
-
decryptAsync
Decrypt with XChaCha20-Poly1305:POST /v2/decrypt.Needs the scope
crypto:decrypt.- Parameters:
request- the request body- Returns:
- a future completed with the result, or exceptionally with an
ApiErroror aTransportError
-
decrypt
Decrypt with XChaCha20-Poly1305:POST /v2/decrypt; waits fordecryptAsync.- Parameters:
request- the request body- Returns:
- the result
- Throws:
ApiError- when the server answers with an error statusTransportError- when no usable response arrives
-
secretboxSealAsync
Encrypt with XChaCha20-Poly1305 (secretbox seal):POST /v2/secretbox/seal.Needs the scope
crypto:encrypt.- Parameters:
request- the request body- Returns:
- a future completed with the result, or exceptionally with an
ApiErroror aTransportError
-
secretboxSeal
Encrypt with XChaCha20-Poly1305 (secretbox seal):POST /v2/secretbox/seal; waits forsecretboxSealAsync.- Parameters:
request- the request body- Returns:
- the result
- Throws:
ApiError- when the server answers with an error statusTransportError- when no usable response arrives
-
secretboxOpenAsync
Decrypt with XChaCha20-Poly1305 (secretbox open):POST /v2/secretbox/open.Needs the scope
crypto:decrypt.- Parameters:
request- the request body- Returns:
- a future completed with the plaintext as UTF-8 text, or exceptionally with an
ApiErroror aTransportError
-
secretboxOpen
Decrypt with XChaCha20-Poly1305 (secretbox open):POST /v2/secretbox/open; waits forsecretboxOpenAsync.- Parameters:
request- the request body- Returns:
- the plaintext as UTF-8 text
- Throws:
ApiError- when the server answers with an error statusTransportError- when no usable response arrives
-
passwordEncryptAsync
public CompletableFuture<PasswordEncryptResult> passwordEncryptAsync(PasswordEncryptRequest request) Encrypt with password (Argon2id + XChaCha20-Poly1305):POST /v2/password/encrypt.Needs the scope
crypto:encrypt.- Parameters:
request- the request body- Returns:
- a future completed with the result, or exceptionally with an
ApiErroror aTransportError
-
passwordEncrypt
Encrypt with password (Argon2id + XChaCha20-Poly1305):POST /v2/password/encrypt; waits forpasswordEncryptAsync.- Parameters:
request- the request body- Returns:
- the result
- Throws:
ApiError- when the server answers with an error statusTransportError- when no usable response arrives
-
passwordDecryptAsync
Decrypt with password (Argon2id + XChaCha20-Poly1305):POST /v2/password/decrypt.Needs the scope
crypto:decrypt.- Parameters:
request- the request body- Returns:
- a future completed with the plaintext as UTF-8 text, or exceptionally with an
ApiErroror aTransportError
-
passwordDecrypt
Decrypt with password (Argon2id + XChaCha20-Poly1305):POST /v2/password/decrypt; waits forpasswordDecryptAsync.- Parameters:
request- the request body- Returns:
- the plaintext as UTF-8 text
- Throws:
ApiError- when the server answers with an error statusTransportError- when no usable response arrives
-
keyWrapAsync
Wrap a key using AES-KW or AES-KWP (RFC 3394/5649):POST /v2/keys/wrap.Needs the scope
crypto:keys.- Parameters:
request- the request body- Returns:
- a future completed with the result, or exceptionally with an
ApiErroror aTransportError
-
keyWrap
Wrap a key using AES-KW or AES-KWP (RFC 3394/5649):POST /v2/keys/wrap; waits forkeyWrapAsync.- Parameters:
request- the request body- Returns:
- the result
- Throws:
ApiError- when the server answers with an error statusTransportError- when no usable response arrives
-
keyUnwrapAsync
Unwrap a key using AES-KW or AES-KWP (RFC 3394/5649):POST /v2/keys/unwrap.Needs the scope
crypto:keys.- Parameters:
request- the request body- Returns:
- a future completed with the unwrapped key as hex, or exceptionally with an
ApiErroror aTransportError
-
keyUnwrap
Unwrap a key using AES-KW or AES-KWP (RFC 3394/5649):POST /v2/keys/unwrap; waits forkeyUnwrapAsync.- Parameters:
request- the request body- Returns:
- the unwrapped key as hex
- Throws:
ApiError- when the server answers with an error statusTransportError- when no usable response arrives
-
hashAsync
Compute a cryptographic hash:POST /v2/hash.Needs the scope
crypto:hash.- Parameters:
request- the request body- Returns:
- a future completed with the result, or exceptionally with an
ApiErroror aTransportError
-
hash
Compute a cryptographic hash:POST /v2/hash; waits forhashAsync.- Parameters:
request- the request body- Returns:
- the result
- Throws:
ApiError- when the server answers with an error statusTransportError- when no usable response arrives
-
macAsync
Compute an HMAC:POST /v2/hmac.Needs the scope
crypto:sign.- Parameters:
request- the request body- Returns:
- a future completed with the result, or exceptionally with an
ApiErroror aTransportError
-
mac
Compute an HMAC:POST /v2/hmac; waits formacAsync.- Parameters:
request- the request body- Returns:
- the result
- Throws:
ApiError- when the server answers with an error statusTransportError- when no usable response arrives
-
macVerifyAsync
Verify an HMAC:POST /v2/hmac/verify.Needs the scope
crypto:verify.- Parameters:
request- the request body- Returns:
- a future completed with the result, or exceptionally with an
ApiErroror aTransportError
-
macVerify
Verify an HMAC:POST /v2/hmac/verify; waits formacVerifyAsync.- Parameters:
request- the request body- Returns:
- the result
- Throws:
ApiError- when the server answers with an error statusTransportError- when no usable response arrives
-
kdfAsync
Derive a key from a password:POST /v2/kdf.Needs the scope
crypto:kdf.- Parameters:
request- the request body- Returns:
- a future completed with the result, or exceptionally with an
ApiErroror aTransportError
-
kdf
Derive a key from a password:POST /v2/kdf; waits forkdfAsync.- Parameters:
request- the request body- Returns:
- the result
- Throws:
ApiError- when the server answers with an error statusTransportError- when no usable response arrives
-
passwordHashAsync
Hash a password with Argon2id:POST /v2/password/hash.Needs the scope
crypto:kdf.- Parameters:
request- the request body- Returns:
- a future completed with the result, or exceptionally with an
ApiErroror aTransportError
-
passwordHash
Hash a password with Argon2id:POST /v2/password/hash; waits forpasswordHashAsync.- Parameters:
request- the request body- Returns:
- the result
- Throws:
ApiError- when the server answers with an error statusTransportError- when no usable response arrives
-
passwordVerifyAsync
Verify a password against an Argon2id hash:POST /v2/password/verify.Needs the scope
crypto:kdf.- Parameters:
request- the request body- Returns:
- a future completed with the result, or exceptionally with an
ApiErroror aTransportError
-
passwordVerify
Verify a password against an Argon2id hash:POST /v2/password/verify; waits forpasswordVerifyAsync.- Parameters:
request- the request body- Returns:
- the result
- Throws:
ApiError- when the server answers with an error statusTransportError- when no usable response arrives
-