Uses of Class
co.ankatech.ankasecure.sdk.exception.AnkaSecureSdkException
Packages that use AnkaSecureSdkException
Package
Description
-
Uses of AnkaSecureSdkException in co.ankatech.ankasecure.sdk
Methods in co.ankatech.ankasecure.sdk that throw AnkaSecureSdkExceptionModifier and TypeMethodDescriptionvoid
AnkaSecureSdk.authenticateApplication
(String clientId, String clientSecret) Authenticates an application using client credentials (clientId/clientSecret).void
AnkaSecureSdk.authenticateUser
(String username, String password, String tenantId) Authenticates a user by username/password.AnkaSecureSdk.createRotation
(String kid, GenerateKeySpec successor) Creates a successor key forkid
and, optionally, schedules the rotation for a future instant.Decrypts an in-memory Compact JWE.AnkaSecureSdk.decryptFile
(Path input, Path output) Decrypts a Compact JWE stored in a file.AnkaSecureSdk.decryptFileStream
(Path input, Path output) Decrypts a ciphertext in streaming mode using a multipart JWET.Encrypts an in-memory payload with the public keykid
.AnkaSecureSdk.encryptFile
(String kid, Path input, Path output) Encrypts the contents of a file with the public keykid
.AnkaSecureSdk.encryptFileStream
(String kid, Path input, Path output) Encrypts a file in streaming mode using the public keykid
.AnkaSecureSdk.encryptFileUtilityStream
(String kty, String alg, String publicKeyBase64, Path input, Path output) Encrypts a local file in streaming mode with an externally supplied public key—no keystore lookup is performed.Exports a key’s specification as a Java object.void
Exports a key’s JSON representation to a file.void
AnkaSecureSdk.generateKey
(GenerateKeySpec spec) Creates a new cryptographic key in the Anka Secure platform using parameters fromGenerateKeySpec
.AnkaSecureSdk.getSupportedAlgorithms()
Retrieves a list of supported algorithms from the server, returning them as a list ofAlgorithmInfo
(kty+alg).void
AnkaSecureSdk.importKey
(ImportKeySpec keyData) Imports an existing key by providing its fields in aImportKeySpec
.void
AnkaSecureSdk.importPrivateKeyPkcs12
(Pkcs12ImportSpec p12spec) Imports a Base64-encoded PKCS#12 (.p12) blob as a new private key.AnkaSecureSdk.listKeys()
Lists every key currently stored in the Anka Secure keystore and returns a readable summary.void
AnkaSecureSdk.patchKey
(String kid, PatchKeySpec patchSpec) Applies a JSON Merge-Patch to update expiry and usage-limit fields.Re-encrypts an in-memory Compact JWE so it is protected by a different key.AnkaSecureSdk.reencryptFile
(String newKid, Path input, Path output) Re-encrypts a Compact JWE file so it is protected bynewKid
.AnkaSecureSdk.reencryptFileStream
(String newKid, String sourceKidOverride, Path input, Path output) Re-encrypts a detached-ciphertext JWE (JWET General JSON + binary envelope) in streaming mode.AnkaSecureSdk.reencryptFileStream
(String newKid, Path input, Path output) Re-encrypts a detached-ciphertext JWE (JWET General JSON + binary envelope) in streaming mode – managed flow.void
Removes a key (bykid
) from the keystore.Generates a fresh Compact JWS for the payload embedded in an existing JWS.AnkaSecureSdk.resignFile
(String newKid, Path oldJws, Path newJws) Re-signs a file-based Compact JWS.AnkaSecureSdk.resignFileStream
(String newKid, Path oldDetachedJwsFile, Path input, Path newDetachedJwsFile) Re-signs a detached-JWS signature in streaming mode.void
Revokes a key bykid
.Signs an in-memory payload with the private keykid
.Generates a Compact JWS by signing the contents of a file.AnkaSecureSdk.signFileStream
(String kid, Path input, Path signature) Signs a file in streaming mode with the private keykid
.AnkaSecureSdk.verifySignature
(String jws) Verifies an in-memory Compact JWS string.AnkaSecureSdk.verifySignature
(Path jwsFile) Verifies a Compact JWS stored in a UTF-8 file.AnkaSecureSdk.verifySignatureStream
(Path input, Path detachedJwsFile) Verifies a detached-JWS signature in streaming mode.AnkaSecureSdk.verifySignatureUtilityStream
(String kty, String alg, String publicKeyBase64, String signatureBase64, Path input) Verifies a detached signature in streaming mode using an external public key—no keystore lookup is performed.Constructors in co.ankatech.ankasecure.sdk that throw AnkaSecureSdkExceptionModifierConstructorDescriptionAnkaSecureSdk
(String accessToken, Properties cliProperties) Constructs the SDK with a manually provided access token (bypassing authentication). -
Uses of AnkaSecureSdkException in co.ankatech.ankasecure.sdk.examples
Methods in co.ankatech.ankasecure.sdk.examples that throw AnkaSecureSdkExceptionModifier and TypeMethodDescriptionstatic AnkaSecureSdk
ExampleUtil.authenticateWithToken
(Properties props) Creates an AnkaSecureSdk instance using a manually provided JWT token. -
Uses of AnkaSecureSdkException in co.ankatech.ankasecure.sdk.internal.service
Methods in co.ankatech.ankasecure.sdk.internal.service that throw AnkaSecureSdkExceptionModifier and TypeMethodDescriptionKeyManagementService.createRotation
(String kid, GenerateKeySpec successor) CryptoService.decryptBytes
(String ciphertextJwe) Decrypts a textual Compact JWE that is already in memory.CryptoService.decryptFile
(Path input, Path output) CryptoService.decryptFileStream
(Path input, Path output) CryptoService.encryptBytes
(String kid, byte[] plaintext) Encrypts raw bytes with the public key identified bykid
.CryptoService.encryptFile
(String kid, Path input, Path output) CryptoService.encryptFileStream
(String kid, Path input, Path output) MigrationService.encryptFileUtilityStream
(String kty, String alg, String publicKeyB64, Path input, Path output) MigrationService.encryptWithExternalPublicKey
(String kty, String alg, String publicKeyB64, Path input, Path output) void
MigrationService.exportKeyToFile
(String kid, Path output) void
KeyManagementService.generateKey
(GenerateKeySpec spec) KeyManagementService.getSupportedAlgorithms()
void
MigrationService.importKey
(ImportKeySpec spec) void
MigrationService.importPrivateKeyPkcs12
(Pkcs12ImportSpec spec) KeyManagementService.listKeys()
void
CryptoService.reencryptBytes
(String newKid, String jweCiphertext) Re-encrypts (rotates) an existing Compact JWE that is in memory so it becomes protected bynewKid
.CryptoService.reencryptFile
(String newKid, Path input, Path output) CryptoService.reencryptFileStream
(String newKid, String sourceKidOverride, Path input, Path output) void
SignatureService.resignBytes
(String newKid, String oldJws) Generates a fresh Compact JWS for the payload embedded inoldJws
.SignatureService.resignFile
(String newKid, Path oldJwsFile, Path newJwsFile) SignatureService.resignFileStream
(Path oldJwsHeader, String newKid, Path input, Path newSignature) Re-sign a detached-payload JWS in streaming mode.
The existing *General-JSON* header (containing the oldkid
) is supplied inoldJwsHeader
.void
Signs an in-memory payload with the private keykid
.SignatureService.signFileStream
(String kid, Path input, Path signature) SignatureService.verifySignature
(Path compactJwsFile) SignatureService.verifySignatureBytes
(String jws) Verifies a textual Compact JWS that is already in memory.MigrationService.verifySignatureStream
(Path input, Path signature) MigrationService.verifySignatureUtilityStream
(String kty, String alg, String publicKeyB64, String signatureB64, Path input) MigrationService.verifyWithExternalPublicKey
(String kty, String alg, String publicKeyB64, String signatureB64, Path input) -
Uses of AnkaSecureSdkException in co.ankatech.ankasecure.sdk.internal.service.impl
Methods in co.ankatech.ankasecure.sdk.internal.service.impl that throw AnkaSecureSdkExceptionModifier and TypeMethodDescriptionKeyManagementServiceImpl.createRotation
(String baseKid, GenerateKeySpec succ) CryptoServiceImpl.decryptBytes
(String jweToken) Decrypt a Compact JWE that is already in RAM.CryptoServiceImpl.decryptFile
(Path input, Path output) CryptoServiceImpl.decryptFileStream
(Path input, Path output) Decrypts a detached JWET file produced by/stream/encrypt
.CryptoServiceImpl.encryptBytes
(String kid, byte[] plaintext) Encrypt raw bytes with a server-side **public** key.CryptoServiceImpl.encryptFile
(String kid, Path input, Path output) CryptoServiceImpl.encryptFileStream
(String kid, Path input, Path output) MigrationServiceImpl.encryptFileUtilityStream
(String kty, String alg, String pubB64, Path input, Path output) MigrationServiceImpl.encryptWithExternalPublicKey
(String kty, String alg, String pubKeyB64, Path input, Path output) void
MigrationServiceImpl.exportKeyToFile
(String kid, Path output) void
KeyManagementServiceImpl.generateKey
(GenerateKeySpec spec) KeyManagementServiceImpl.getSupportedAlgorithms()
void
MigrationServiceImpl.importKey
(ImportKeySpec s) void
MigrationServiceImpl.importPrivateKeyPkcs12
(Pkcs12ImportSpec s) KeyManagementServiceImpl.listKeys()
void
CryptoServiceImpl.reencryptBytes
(String newKid, String jweToken) Re-encrypt a JWE in memory so it becomes protected bynewKid
.CryptoServiceImpl.reencryptFile
(String newKid, Path input, Path output) CryptoServiceImpl.reencryptFileStream
(String newKid, String sourceKidOverride, Path input, Path output) Server-side re-encryption of a legacy ciphertext (nokid
) into a post-quantum ciphertext undernewKid
.void
SignatureServiceImpl.resignBytes
(String newKid, String oldJws) Re-sign a Compact JWS switching tonewKid
.SignatureServiceImpl.resignFile
(String newKid, Path oldJws, Path newJws) SignatureServiceImpl.resignFileStream
(Path oldJws, String newKid, Path input, Path newSigOut) void
Sign an in-memory payload with a server-side **private** key.SignatureServiceImpl.signFileStream
(String kid, Path input, Path sigOut) SignatureServiceImpl.verifySignature
(Path jwsFile) SignatureServiceImpl.verifySignatureBytes
(String jwsToken) Verify a Compact JWS that is fully in memory.MigrationServiceImpl.verifySignatureStream
(Path input, Path jwsHdr) MigrationServiceImpl.verifySignatureUtilityStream
(String kty, String alg, String pubKeyB64, String sigB64, Path input) MigrationServiceImpl.verifyWithExternalPublicKey
(String kty, String alg, String pubKeyB64, String sigB64, Path input) -
Uses of AnkaSecureSdkException in co.ankatech.ankasecure.sdk.internal.util
Methods in co.ankatech.ankasecure.sdk.internal.util that return AnkaSecureSdkExceptionModifier and TypeMethodDescriptionstatic AnkaSecureSdkException
Translates an exception into anAnkaSecureSdkException
with a human-readable message.static AnkaSecureSdkException
ExceptionTranslator.translateI18n
(String key, Exception cause, Map<String, String> ctx, Object... args) Translates an exception into anAnkaSecureSdkException
using a localized message.Methods in co.ankatech.ankasecure.sdk.internal.util that throw AnkaSecureSdkExceptionModifier and TypeMethodDescriptionstatic void
Ensures thatpath
exists, is a regular file and is readable.static void
Ensures that the parent directory ofpath
exists and that the file can be created or overwritten.