Class CryptoServiceClient

java.lang.Object
co.cryptoservice.sdk.CryptoServiceClient
All Implemented Interfaces:
AutoCloseable

public final class CryptoServiceClient extends Object implements AutoCloseable
A client for the Crypto Service REST API (crypto-server). Every operation is an HTTP call: the SDK performs no cryptography itself.

 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.

  • Field Details

    • VERSION

      public static final String VERSION
      This SDK's version, sent as User-Agent: crypto-service-sdk-java/<version>.
      See Also:
  • Method Details

    • builder

      public static CryptoServiceClient.Builder builder()
      Starts a builder; CryptoServiceClient.Builder.baseUrl is 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 example POST
      path - the path below the base URL, starting with /
      body - the body, or null to send none
      contentType - the body's media type, or null for application/json
      Returns:
      a future completed with the response, or exceptionally with a TransportError
      Throws:
      IllegalArgumentException - when the path does not start with /
    • request

      public RawResponse request(String method, String path, byte[] body, String contentType)
      Sends one request and waits for the answer; see requestAsync.
      Parameters:
      method - the HTTP method, for example POST
      path - the path below the base URL, starting with /
      body - the body, or null to send none
      contentType - the body's media type, or null for application/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 own HttpClient, closes it (on Java 21 and later, where HttpClient is AutoCloseable; on Java 17 its threads end once it is unreachable). An injected HttpClient is left open. Idempotent.
      Specified by:
      close in interface AutoCloseable
    • healthAsync

      public CompletableFuture<HealthResult> healthAsync()
      Health check: GET /health.

      A public route: the client sends no credentials.

      Returns:
      a future completed with the result, or exceptionally with an ApiError or a TransportError
    • health

      public HealthResult health()
      Health check: GET /health; waits for healthAsync.
      Returns:
      the result
      Throws:
      ApiError - when the server answers with an error status
      TransportError - when no usable response arrives
    • liveAsync

      public CompletableFuture<LiveResult> liveAsync()
      Liveness probe: GET /live.

      A public route: the client sends no credentials.

      Returns:
      a future completed with the result, or exceptionally with an ApiError or a TransportError
    • live

      public LiveResult live()
      Liveness probe: GET /live; waits for liveAsync.
      Returns:
      the result
      Throws:
      ApiError - when the server answers with an error status
      TransportError - when no usable response arrives
    • readyAsync

      public CompletableFuture<ReadyResult> readyAsync()
      Readiness probe: GET /ready.

      A public route: the client sends no credentials.

      Returns:
      a future completed with the result, or exceptionally with an ApiError or a TransportError
    • ready

      public ReadyResult ready()
      Readiness probe: GET /ready; waits for readyAsync.
      Returns:
      the result
      Throws:
      ApiError - when the server answers with an error status
      TransportError - when no usable response arrives
    • serviceInfoAsync

      public CompletableFuture<ServiceInfo> serviceInfoAsync()
      Service metadata: GET /.
      Returns:
      a future completed with the result, or exceptionally with an ApiError or a TransportError
    • serviceInfo

      public ServiceInfo serviceInfo()
      Service metadata: GET /; waits for serviceInfoAsync.
      Returns:
      the result
      Throws:
      ApiError - when the server answers with an error status
      TransportError - when no usable response arrives
    • algorithmsAsync

      public CompletableFuture<Map<String,List<String>>> algorithmsAsync()
      List supported algorithms: GET /v2/algorithms.
      Returns:
      a future completed with the algorithm names, by category, or exceptionally with an ApiError or a TransportError
    • algorithms

      public Map<String,List<String>> algorithms()
      List supported algorithms: GET /v2/algorithms; waits for algorithmsAsync.
      Returns:
      the algorithm names, by category
      Throws:
      ApiError - when the server answers with an error status
      TransportError - when no usable response arrives
    • getCbomAsync

      public CompletableFuture<CbomDocument> 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 ApiError or a TransportError
    • getCbom

      public CbomDocument getCbom()
      Cryptographic Bill of Materials (CBOM) in CycloneDX 1.6 format: GET /v2/compliance/cbom; waits for getCbomAsync.
      Returns:
      the result
      Throws:
      ApiError - when the server answers with an error status
      TransportError - when no usable response arrives
    • getDoraComplianceAsync

      public CompletableFuture<DoraScorecard> getDoraComplianceAsync()
      DORA cryptographic inventory (self-assessment): GET /v2/compliance/dora.
      Returns:
      a future completed with the result, or exceptionally with an ApiError or a TransportError
    • getDoraCompliance

      public DoraScorecard getDoraCompliance()
      DORA cryptographic inventory (self-assessment): GET /v2/compliance/dora; waits for getDoraComplianceAsync.
      Returns:
      the result
      Throws:
      ApiError - when the server answers with an error status
      TransportError - when no usable response arrives
    • kmsCreateKeyAsync

      public CompletableFuture<KmsKey> kmsCreateKeyAsync(KmsCreateKeyRequest request)
      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 ApiError or a TransportError
    • kmsCreateKey

      public KmsKey kmsCreateKey(KmsCreateKeyRequest request)
      Create a managed key in the designated KMS provider: POST /v2/kms/create-key; waits for kmsCreateKeyAsync.
      Parameters:
      request - the request body
      Returns:
      the result
      Throws:
      ApiError - when the server answers with an error status
      TransportError - when no usable response arrives
    • kmsCreateKeyAsync

      public CompletableFuture<KmsKey> 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

      public KmsKey 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 status
      TransportError - when no usable response arrives
    • kmsWrapAsync

      public CompletableFuture<KmsWrapResult> kmsWrapAsync(KmsWrapRequest request)
      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 ApiError or a TransportError
    • kmsWrap

      public KmsWrapResult kmsWrap(KmsWrapRequest request)
      Wrap an existing key using a managed KMS key: POST /v2/kms/wrap; waits for kmsWrapAsync.
      Parameters:
      request - the request body
      Returns:
      the result
      Throws:
      ApiError - when the server answers with an error status
      TransportError - when no usable response arrives
    • kmsUnwrapAsync

      public CompletableFuture<KmsUnwrapResult> kmsUnwrapAsync(KmsUnwrapRequest request)
      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 ApiError or a TransportError
    • kmsUnwrap

      public KmsUnwrapResult kmsUnwrap(KmsUnwrapRequest request)
      Unwrap a wrapped key using a managed KMS key: POST /v2/kms/unwrap; waits for kmsUnwrapAsync.
      Parameters:
      request - the request body
      Returns:
      the result
      Throws:
      ApiError - when the server answers with an error status
      TransportError - when no usable response arrives
    • kmsGenerateDataKeyAsync

      public CompletableFuture<KmsDataKey> kmsGenerateDataKeyAsync(KmsGenerateDataKeyRequest request)
      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 ApiError or a TransportError
    • kmsGenerateDataKey

      public KmsDataKey kmsGenerateDataKey(KmsGenerateDataKeyRequest request)
      Generate a Data Encryption Key (DEK) via KMS provider: POST /v2/kms/generate-data-key; waits for kmsGenerateDataKeyAsync.
      Parameters:
      request - the request body
      Returns:
      the result
      Throws:
      ApiError - when the server answers with an error status
      TransportError - when no usable response arrives
    • kmsEncryptAsync

      public CompletableFuture<KmsEncryptResult> kmsEncryptAsync(KmsEncryptRequest request)
      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 ApiError or a TransportError
    • kmsEncrypt

      public KmsEncryptResult kmsEncrypt(KmsEncryptRequest request)
      Encrypt plaintext with a managed KMS key: POST /v2/kms/encrypt; waits for kmsEncryptAsync.
      Parameters:
      request - the request body
      Returns:
      the result
      Throws:
      ApiError - when the server answers with an error status
      TransportError - when no usable response arrives
    • kmsDecryptAsync

      public CompletableFuture<KmsDecryptResult> kmsDecryptAsync(KmsDecryptRequest request)
      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 ApiError or a TransportError
    • kmsDecrypt

      public KmsDecryptResult kmsDecrypt(KmsDecryptRequest request)
      Decrypt ciphertext with a managed KMS key: POST /v2/kms/decrypt; waits for kmsDecryptAsync.
      Parameters:
      request - the request body
      Returns:
      the result
      Throws:
      ApiError - when the server answers with an error status
      TransportError - 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 ApiError or a TransportError
    • opaqueRegisterInit

      public OpaqueRegisterInitResult opaqueRegisterInit(OpaqueRegisterInitRequest request)
      Initiate OPAQUE credential registration: POST /v2/opaque/register/init; waits for opaqueRegisterInitAsync.
      Parameters:
      request - the request body
      Returns:
      the result
      Throws:
      ApiError - when the server answers with an error status
      TransportError - 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 ApiError or a TransportError
    • opaqueRegisterFinish

      public OpaqueRegisterFinishResult opaqueRegisterFinish(OpaqueRegisterFinishRequest request)
      Finish OPAQUE credential registration: POST /v2/opaque/register/finish; waits for opaqueRegisterFinishAsync.
      Parameters:
      request - the request body
      Returns:
      the result
      Throws:
      ApiError - when the server answers with an error status
      TransportError - 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 ApiError or a TransportError
    • opaqueLoginInit

      public OpaqueLoginInitResult opaqueLoginInit(OpaqueLoginInitRequest request)
      Initiate OPAQUE login handshake: POST /v2/opaque/login/init; waits for opaqueLoginInitAsync.
      Parameters:
      request - the request body
      Returns:
      the result
      Throws:
      ApiError - when the server answers with an error status
      TransportError - 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 ApiError or a TransportError
    • opaqueLoginFinish

      public OpaqueLoginFinishResult opaqueLoginFinish(OpaqueLoginFinishRequest request)
      Finish OPAQUE login handshake: POST /v2/opaque/login/finish; waits for opaqueLoginFinishAsync.
      Parameters:
      request - the request body
      Returns:
      the result
      Throws:
      ApiError - when the server answers with an error status
      TransportError - 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 ApiError or a TransportError
    • streamPqEncrypt

      public StreamPqEncryptResult streamPqEncrypt(StreamPqEncryptRequest request)
      Encrypt stream with hybrid post-quantum AEAD: POST /v2/stream/pq-encrypt; waits for streamPqEncryptAsync.
      Parameters:
      request - the request body
      Returns:
      the result
      Throws:
      ApiError - when the server answers with an error status
      TransportError - 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 ApiError or a TransportError
    • streamPqDecrypt

      public StreamPqDecryptResult streamPqDecrypt(StreamPqDecryptRequest request)
      Decrypt stream with server-held hybrid post-quantum key: POST /v2/stream/pq-decrypt; waits for streamPqDecryptAsync.
      Parameters:
      request - the request body
      Returns:
      the result
      Throws:
      ApiError - when the server answers with an error status
      TransportError - 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 ApiError or a TransportError
    • streamMultiPqEncrypt

      public StreamMultiPqEncryptResult streamMultiPqEncrypt(StreamMultiPqEncryptRequest request)
      Encrypt stream for multiple recipients with hybrid post-quantum AEAD: POST /v2/stream/multi-pq-encrypt; waits for streamMultiPqEncryptAsync.
      Parameters:
      request - the request body
      Returns:
      the result
      Throws:
      ApiError - when the server answers with an error status
      TransportError - 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 ApiError or a TransportError
    • streamMultiPqDecrypt

      public StreamMultiPqDecryptResult streamMultiPqDecrypt(StreamMultiPqDecryptRequest request)
      Decrypt multi-recipient stream with server-held hybrid post-quantum key: POST /v2/stream/multi-pq-decrypt; waits for streamMultiPqDecryptAsync.
      Parameters:
      request - the request body
      Returns:
      the result
      Throws:
      ApiError - when the server answers with an error status
      TransportError - when no usable response arrives
    • iso20022VerifyAsync

      public CompletableFuture<Iso20022VerifyResult> iso20022VerifyAsync(Iso20022VerifyRequest request)
      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 ApiError or a TransportError
    • iso20022Verify

      public Iso20022VerifyResult iso20022Verify(Iso20022VerifyRequest request)
      Verify ISO 20022 post-quantum dual-signature envelope: POST /v2/stream/iso20022; waits for iso20022VerifyAsync.
      Parameters:
      request - the request body
      Returns:
      the result
      Throws:
      ApiError - when the server answers with an error status
      TransportError - when no usable response arrives
    • hpkeGenerateKeyPairAsync

      public CompletableFuture<HpkeKeyPair> hpkeGenerateKeyPairAsync(HpkeKeygenRequest request)
      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 ApiError or a TransportError
    • hpkeGenerateKeyPair

      public HpkeKeyPair hpkeGenerateKeyPair(HpkeKeygenRequest request)
      Generate a server-held HPKE key pair (classical or post-quantum hybrid): POST /v2/hpke/keygen; waits for hpkeGenerateKeyPairAsync.
      Parameters:
      request - the request body
      Returns:
      the result
      Throws:
      ApiError - when the server answers with an error status
      TransportError - when no usable response arrives
    • hpkeGenerateKeyPairAsync

      public CompletableFuture<HpkeKeyPair> 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

      public HpkeKeyPair 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 status
      TransportError - when no usable response arrives
    • hpkeSealAsync

      public CompletableFuture<HpkeSealResult> hpkeSealAsync(HpkeSealRequest request)
      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 ApiError or a TransportError
    • hpkeSeal

      public HpkeSealResult hpkeSeal(HpkeSealRequest request)
      Encrypt (seal) a message using HPKE (RFC 9180): POST /v2/hpke/seal; waits for hpkeSealAsync.
      Parameters:
      request - the request body
      Returns:
      the result
      Throws:
      ApiError - when the server answers with an error status
      TransportError - when no usable response arrives
    • hpkeOpenAsync

      public CompletableFuture<HpkeOpenResult> hpkeOpenAsync(HpkeOpenRequest request)
      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 ApiError or a TransportError
    • hpkeOpen

      public HpkeOpenResult hpkeOpen(HpkeOpenRequest request)
      Decrypt (open) an HPKE ciphertext with a server-held key: POST /v2/hpke/open; waits for hpkeOpenAsync.
      Parameters:
      request - the request body
      Returns:
      the result
      Throws:
      ApiError - when the server answers with an error status
      TransportError - when no usable response arrives
    • mlKemGenerateKeyPairAsync

      public CompletableFuture<MlKemKeyPair> 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 ApiError or a TransportError
    • mlKemGenerateKeyPair

      public MlKemKeyPair mlKemGenerateKeyPair()
      Generate a server-held ML-KEM-768 key pair: POST /v2/pq/keygen; waits for mlKemGenerateKeyPairAsync.
      Returns:
      the result
      Throws:
      ApiError - when the server answers with an error status
      TransportError - 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 ApiError or a TransportError
    • mlKemEncapsulate

      public MlKemEncapsulateResult mlKemEncapsulate(MlKemEncapsulateRequest request)
      ML-KEM encapsulate: POST /v2/pq/encapsulate; waits for mlKemEncapsulateAsync.
      Parameters:
      request - the request body
      Returns:
      the result
      Throws:
      ApiError - when the server answers with an error status
      TransportError - 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 ApiError or a TransportError
    • mlKemDecapsulate

      public KemDecapsulateResult mlKemDecapsulate(MlKemDecapsulateRequest request)
      ML-KEM decapsulate: POST /v2/pq/decapsulate; waits for mlKemDecapsulateAsync.
      Parameters:
      request - the request body
      Returns:
      the result
      Throws:
      ApiError - when the server answers with an error status
      TransportError - when no usable response arrives
    • pqGenerateKeyPairAsync

      public CompletableFuture<HybridKeyPair> 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 ApiError or a TransportError
    • pqGenerateKeyPair

      public HybridKeyPair pqGenerateKeyPair()
      Generate a server-held hybrid X25519 + ML-KEM-768 key pair: POST /v2/pq/hybrid/keygen; waits for pqGenerateKeyPairAsync.
      Returns:
      the result
      Throws:
      ApiError - when the server answers with an error status
      TransportError - when no usable response arrives
    • pqEncapsulateAsync

      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 ApiError or a TransportError
    • pqEncapsulate

      public HybridEncapsulateResult pqEncapsulate(HybridEncapsulateRequest request)
      Hybrid encapsulate (X25519 + ML-KEM-768): POST /v2/pq/hybrid/encapsulate; waits for pqEncapsulateAsync.
      Parameters:
      request - the request body
      Returns:
      the result
      Throws:
      ApiError - when the server answers with an error status
      TransportError - when no usable response arrives
    • pqDecapsulateAsync

      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 ApiError or a TransportError
    • pqDecapsulate

      public HybridDecapsulateResult pqDecapsulate(HybridDecapsulateRequest request)
      Hybrid decapsulate (X25519 + ML-KEM-768): POST /v2/pq/hybrid/decapsulate; waits for pqDecapsulateAsync.
      Parameters:
      request - the request body
      Returns:
      the result
      Throws:
      ApiError - when the server answers with an error status
      TransportError - when no usable response arrives
    • pqSignKeygenAsync

      public CompletableFuture<MlDsaKeyPair> pqSignKeygenAsync(MlDsaKeygenRequest request)
      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 ApiError or a TransportError
    • pqSignKeygen

      public MlDsaKeyPair pqSignKeygen(MlDsaKeygenRequest request)
      Generate a server-held ML-DSA key pair (FIPS 204): POST /v2/pq/dsa/keygen; waits for pqSignKeygenAsync.
      Parameters:
      request - the request body
      Returns:
      the result
      Throws:
      ApiError - when the server answers with an error status
      TransportError - when no usable response arrives
    • pqSignAsync

      public CompletableFuture<MlDsaSignResult> pqSignAsync(SignRequest request)
      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 ApiError or a TransportError
    • pqSign

      public MlDsaSignResult pqSign(SignRequest request)
      Sign with ML-DSA (FIPS 204): POST /v2/pq/dsa/sign; waits for pqSignAsync.
      Parameters:
      request - the request body
      Returns:
      the result
      Throws:
      ApiError - when the server answers with an error status
      TransportError - when no usable response arrives
    • pqVerifyAsync

      public CompletableFuture<MlDsaVerifyResult> pqVerifyAsync(MlDsaVerifyRequest request)
      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 ApiError or a TransportError
    • pqVerify

      public MlDsaVerifyResult pqVerify(MlDsaVerifyRequest request)
      Verify with ML-DSA (FIPS 204): POST /v2/pq/dsa/verify; waits for pqVerifyAsync.
      Parameters:
      request - the request body
      Returns:
      the result
      Throws:
      ApiError - when the server answers with an error status
      TransportError - when no usable response arrives
    • pqHashSignKeygenAsync

      public CompletableFuture<SlhDsaKeyPair> pqHashSignKeygenAsync(SlhDsaKeygenRequest request)
      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 ApiError or a TransportError
    • pqHashSignKeygen

      public SlhDsaKeyPair pqHashSignKeygen(SlhDsaKeygenRequest request)
      Generate a server-held SLH-DSA key pair (FIPS 205): POST /v2/pq/slh-dsa/keygen; waits for pqHashSignKeygenAsync.
      Parameters:
      request - the request body
      Returns:
      the result
      Throws:
      ApiError - when the server answers with an error status
      TransportError - when no usable response arrives
    • pqHashSignAsync

      public CompletableFuture<SlhDsaSignResult> pqHashSignAsync(SignRequest request)
      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 ApiError or a TransportError
    • pqHashSign

      public SlhDsaSignResult pqHashSign(SignRequest request)
      Sign with SLH-DSA (FIPS 205): POST /v2/pq/slh-dsa/sign; waits for pqHashSignAsync.
      Parameters:
      request - the request body
      Returns:
      the result
      Throws:
      ApiError - when the server answers with an error status
      TransportError - when no usable response arrives
    • pqHashVerifyAsync

      public CompletableFuture<SlhDsaVerifyResult> pqHashVerifyAsync(SlhDsaVerifyRequest request)
      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 ApiError or a TransportError
    • pqHashVerify

      public SlhDsaVerifyResult pqHashVerify(SlhDsaVerifyRequest request)
      Verify with SLH-DSA (FIPS 205): POST /v2/pq/slh-dsa/verify; waits for pqHashVerifyAsync.
      Parameters:
      request - the request body
      Returns:
      the result
      Throws:
      ApiError - when the server answers with an error status
      TransportError - when no usable response arrives
    • generateKeyPairAsync

      public CompletableFuture<KeyGenerateResult> generateKeyPairAsync(KeyGenerateRequest request)
      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 ApiError or a TransportError
    • generateKeyPair

      public KeyGenerateResult generateKeyPair(KeyGenerateRequest request)
      Generate a server-held key pair for any supported algorithm: POST /v2/keys/generate; waits for generateKeyPairAsync.
      Parameters:
      request - the request body
      Returns:
      the result
      Throws:
      ApiError - when the server answers with an error status
      TransportError - when no usable response arrives
    • generateKeyPairAsync

      public CompletableFuture<KeyGenerateResult> 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

      public KeyGenerateResult 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 status
      TransportError - when no usable response arrives
    • exportKeyAsync

      public CompletableFuture<KeyExportResult> exportKeyAsync(KeyIdRequest request)
      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 ApiError or a TransportError
    • exportKey

      public KeyExportResult exportKey(KeyIdRequest request)
      Export a server-held private key: POST /v2/keys/export; waits for exportKeyAsync.
      Parameters:
      request - the request body
      Returns:
      the result
      Throws:
      ApiError - when the server answers with an error status
      TransportError - when no usable response arrives
    • deleteKeyAsync

      public CompletableFuture<KeyDeleteResult> deleteKeyAsync(KeyIdRequest request)
      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 ApiError or a TransportError
    • deleteKey

      public KeyDeleteResult deleteKey(KeyIdRequest request)
      Delete a server-held key: POST /v2/keys/delete; waits for deleteKeyAsync.
      Parameters:
      request - the request body
      Returns:
      the result
      Throws:
      ApiError - when the server answers with an error status
      TransportError - when no usable response arrives
    • signAsync

      public CompletableFuture<SignResult> signAsync(SignRequest request)
      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 ApiError or a TransportError
    • sign

      public SignResult sign(SignRequest request)
      Sign with Ed25519: POST /v2/sign; waits for signAsync.
      Parameters:
      request - the request body
      Returns:
      the result
      Throws:
      ApiError - when the server answers with an error status
      TransportError - when no usable response arrives
    • verifyAsync

      public CompletableFuture<VerifyResult> verifyAsync(VerifyRequest request)
      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 ApiError or a TransportError
    • verify

      public VerifyResult verify(VerifyRequest request)
      Verify an Ed25519 signature: POST /v2/verify; waits for verifyAsync.
      Parameters:
      request - the request body
      Returns:
      the result
      Throws:
      ApiError - when the server answers with an error status
      TransportError - when no usable response arrives
    • streamSignAsync

      public CompletableFuture<StreamSignResult> streamSignAsync(StreamSignRequest request)
      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 ApiError or a TransportError
    • streamSign

      public StreamSignResult streamSign(StreamSignRequest request)
      Batch sign messages with sub-millisecond throughput: POST /v2/stream/sign; waits for streamSignAsync.
      Parameters:
      request - the request body
      Returns:
      the result
      Throws:
      ApiError - when the server answers with an error status
      TransportError - when no usable response arrives
    • streamVerifyAsync

      public CompletableFuture<StreamVerifyResult> streamVerifyAsync(StreamVerifyRequest request)
      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 ApiError or a TransportError
    • streamVerify

      public StreamVerifyResult streamVerify(StreamVerifyRequest request)
      Batch verify digital signatures: POST /v2/stream/verify; waits for streamVerifyAsync.
      Parameters:
      request - the request body
      Returns:
      the result
      Throws:
      ApiError - when the server answers with an error status
      TransportError - when no usable response arrives
    • sealedboxSealAsync

      public CompletableFuture<SealedboxSealResult> sealedboxSealAsync(SealedboxSealRequest request)
      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 ApiError or a TransportError
    • sealedboxSeal

      public SealedboxSealResult sealedboxSeal(SealedboxSealRequest request)
      Anonymous public-key encryption (X25519 sealed box): POST /v2/sealedbox/seal; waits for sealedboxSealAsync.
      Parameters:
      request - the request body
      Returns:
      the result
      Throws:
      ApiError - when the server answers with an error status
      TransportError - when no usable response arrives
    • sealedboxOpenAsync

      public CompletableFuture<String> sealedboxOpenAsync(SealedboxOpenRequest request)
      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 ApiError or a TransportError
    • sealedboxOpen

      public String sealedboxOpen(SealedboxOpenRequest request)
      Decrypt an anonymous sealed box (X25519): POST /v2/sealedbox/open; waits for sealedboxOpenAsync.
      Parameters:
      request - the request body
      Returns:
      the plaintext as UTF-8 text
      Throws:
      ApiError - when the server answers with an error status
      TransportError - when no usable response arrives
    • sealedboxSealPqAsync

      public CompletableFuture<SealedboxSealResult> sealedboxSealPqAsync(SealedboxSealPqRequest request)
      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 ApiError or a TransportError
    • sealedboxSealPq

      public SealedboxSealResult sealedboxSealPq(SealedboxSealPqRequest request)
      Post-quantum anonymous encryption (X25519 + ML-KEM-768 sealed box): POST /v2/sealedbox/seal-pq; waits for sealedboxSealPqAsync.
      Parameters:
      request - the request body
      Returns:
      the result
      Throws:
      ApiError - when the server answers with an error status
      TransportError - when no usable response arrives
    • sealedboxOpenPqAsync

      public CompletableFuture<String> sealedboxOpenPqAsync(SealedboxOpenRequest request)
      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 ApiError or a TransportError
    • sealedboxOpenPq

      public String sealedboxOpenPq(SealedboxOpenRequest request)
      Decrypt a post-quantum sealed box (X25519 + ML-KEM-768): POST /v2/sealedbox/open-pq; waits for sealedboxOpenPqAsync.
      Parameters:
      request - the request body
      Returns:
      the plaintext as UTF-8 text
      Throws:
      ApiError - when the server answers with an error status
      TransportError - 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 ApiError or a TransportError
    • multiRecipientEncrypt

      public MultiRecipientResult multiRecipientEncrypt(MultiRecipientEncryptRequest request)
      Encrypt for multiple recipients (hybrid key wrapping): POST /v2/multi-recipient/encrypt; waits for multiRecipientEncryptAsync.
      Parameters:
      request - the request body
      Returns:
      the result
      Throws:
      ApiError - when the server answers with an error status
      TransportError - when no usable response arrives
    • encryptAsync

      public CompletableFuture<AeadResult> encryptAsync(EncryptRequest request)
      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 ApiError or a TransportError
    • encrypt

      public AeadResult encrypt(EncryptRequest request)
      Encrypt with XChaCha20-Poly1305: POST /v2/encrypt; waits for encryptAsync.
      Parameters:
      request - the request body
      Returns:
      the result
      Throws:
      ApiError - when the server answers with an error status
      TransportError - when no usable response arrives
    • decryptAsync

      public CompletableFuture<DecryptResult> decryptAsync(DecryptRequest request)
      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 ApiError or a TransportError
    • decrypt

      public DecryptResult decrypt(DecryptRequest request)
      Decrypt with XChaCha20-Poly1305: POST /v2/decrypt; waits for decryptAsync.
      Parameters:
      request - the request body
      Returns:
      the result
      Throws:
      ApiError - when the server answers with an error status
      TransportError - when no usable response arrives
    • secretboxSealAsync

      public CompletableFuture<SecretboxSealResult> secretboxSealAsync(SecretboxSealRequest request)
      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 ApiError or a TransportError
    • secretboxSeal

      public SecretboxSealResult secretboxSeal(SecretboxSealRequest request)
      Encrypt with XChaCha20-Poly1305 (secretbox seal): POST /v2/secretbox/seal; waits for secretboxSealAsync.
      Parameters:
      request - the request body
      Returns:
      the result
      Throws:
      ApiError - when the server answers with an error status
      TransportError - when no usable response arrives
    • secretboxOpenAsync

      public CompletableFuture<String> secretboxOpenAsync(SecretboxOpenRequest request)
      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 ApiError or a TransportError
    • secretboxOpen

      public String secretboxOpen(SecretboxOpenRequest request)
      Decrypt with XChaCha20-Poly1305 (secretbox open): POST /v2/secretbox/open; waits for secretboxOpenAsync.
      Parameters:
      request - the request body
      Returns:
      the plaintext as UTF-8 text
      Throws:
      ApiError - when the server answers with an error status
      TransportError - 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 ApiError or a TransportError
    • passwordEncrypt

      public PasswordEncryptResult passwordEncrypt(PasswordEncryptRequest request)
      Encrypt with password (Argon2id + XChaCha20-Poly1305): POST /v2/password/encrypt; waits for passwordEncryptAsync.
      Parameters:
      request - the request body
      Returns:
      the result
      Throws:
      ApiError - when the server answers with an error status
      TransportError - when no usable response arrives
    • passwordDecryptAsync

      public CompletableFuture<String> passwordDecryptAsync(PasswordDecryptRequest request)
      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 ApiError or a TransportError
    • passwordDecrypt

      public String passwordDecrypt(PasswordDecryptRequest request)
      Decrypt with password (Argon2id + XChaCha20-Poly1305): POST /v2/password/decrypt; waits for passwordDecryptAsync.
      Parameters:
      request - the request body
      Returns:
      the plaintext as UTF-8 text
      Throws:
      ApiError - when the server answers with an error status
      TransportError - when no usable response arrives
    • keyWrapAsync

      public CompletableFuture<KeyWrapResult> keyWrapAsync(KeyWrapRequest request)
      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 ApiError or a TransportError
    • keyWrap

      public KeyWrapResult keyWrap(KeyWrapRequest request)
      Wrap a key using AES-KW or AES-KWP (RFC 3394/5649): POST /v2/keys/wrap; waits for keyWrapAsync.
      Parameters:
      request - the request body
      Returns:
      the result
      Throws:
      ApiError - when the server answers with an error status
      TransportError - when no usable response arrives
    • keyUnwrapAsync

      public CompletableFuture<String> keyUnwrapAsync(KeyUnwrapRequest request)
      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 ApiError or a TransportError
    • keyUnwrap

      public String keyUnwrap(KeyUnwrapRequest request)
      Unwrap a key using AES-KW or AES-KWP (RFC 3394/5649): POST /v2/keys/unwrap; waits for keyUnwrapAsync.
      Parameters:
      request - the request body
      Returns:
      the unwrapped key as hex
      Throws:
      ApiError - when the server answers with an error status
      TransportError - when no usable response arrives
    • hashAsync

      public CompletableFuture<HashResult> hashAsync(HashRequest request)
      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 ApiError or a TransportError
    • hash

      public HashResult hash(HashRequest request)
      Compute a cryptographic hash: POST /v2/hash; waits for hashAsync.
      Parameters:
      request - the request body
      Returns:
      the result
      Throws:
      ApiError - when the server answers with an error status
      TransportError - when no usable response arrives
    • macAsync

      public CompletableFuture<MacResult> macAsync(MacRequest request)
      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 ApiError or a TransportError
    • mac

      public MacResult mac(MacRequest request)
      Compute an HMAC: POST /v2/hmac; waits for macAsync.
      Parameters:
      request - the request body
      Returns:
      the result
      Throws:
      ApiError - when the server answers with an error status
      TransportError - when no usable response arrives
    • macVerifyAsync

      public CompletableFuture<MacVerifyResult> macVerifyAsync(MacVerifyRequest request)
      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 ApiError or a TransportError
    • macVerify

      public MacVerifyResult macVerify(MacVerifyRequest request)
      Verify an HMAC: POST /v2/hmac/verify; waits for macVerifyAsync.
      Parameters:
      request - the request body
      Returns:
      the result
      Throws:
      ApiError - when the server answers with an error status
      TransportError - when no usable response arrives
    • kdfAsync

      public CompletableFuture<KdfResult> kdfAsync(KdfRequest request)
      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 ApiError or a TransportError
    • kdf

      public KdfResult kdf(KdfRequest request)
      Derive a key from a password: POST /v2/kdf; waits for kdfAsync.
      Parameters:
      request - the request body
      Returns:
      the result
      Throws:
      ApiError - when the server answers with an error status
      TransportError - when no usable response arrives
    • passwordHashAsync

      public CompletableFuture<PasswordHashResult> passwordHashAsync(PasswordHashRequest request)
      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 ApiError or a TransportError
    • passwordHash

      public PasswordHashResult passwordHash(PasswordHashRequest request)
      Hash a password with Argon2id: POST /v2/password/hash; waits for passwordHashAsync.
      Parameters:
      request - the request body
      Returns:
      the result
      Throws:
      ApiError - when the server answers with an error status
      TransportError - when no usable response arrives
    • passwordVerifyAsync

      public CompletableFuture<PasswordVerifyResult> passwordVerifyAsync(PasswordVerifyRequest request)
      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 ApiError or a TransportError
    • passwordVerify

      public PasswordVerifyResult passwordVerify(PasswordVerifyRequest request)
      Verify a password against an Argon2id hash: POST /v2/password/verify; waits for passwordVerifyAsync.
      Parameters:
      request - the request body
      Returns:
      the result
      Throws:
      ApiError - when the server answers with an error status
      TransportError - when no usable response arrives