Class UtilityOperations

java.lang.Object
co.ankatech.ankasecure.sdk.operations.UtilityOperations

public final class UtilityOperations extends Object
Utility operations facade for PKCS#7 analysis, conversion, and migration.

Public facade for utility operations including PKCS#7 analysis and migration. All methods are exposed via AuthenticatedSdk.

  • Constructor Summary

    Constructors
    Constructor
    Description
    UtilityOperations(InternalServiceFactory svc, TokenSource tokenSource, BooleanSupplier timingMetricsEnabled, org.slf4j.Logger userLogger)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    co.ankatech.secure.client.model.Pkcs7AnalysisResponse
    analyzePkcs7(co.ankatech.secure.client.model.Pkcs7AnalysisRequest request)
    Analyzes a PKCS#7 structure (compact mode).
    co.ankatech.secure.client.model.Pkcs7AnalysisResponse
    Analyzes a PKCS#7 structure (streaming mode for large files).
    co.ankatech.secure.client.model.Pkcs7ConversionResponse
    convertPkcs7ToJose(co.ankatech.secure.client.model.Pkcs7ConversionRequest request)
    Converts PKCS#7 signed-data to JOSE JWS format (compact mode).
    convertPkcs7ToJoseStream(co.ankatech.secure.client.model.Pkcs7ConversionStreamRequest metadata, File inputFile, File outputFile)
    Converts PKCS#7 signed-data to JOSE JWS format (streaming mode for large files).
    performMigrationWorkflow(File pkcs7File, co.ankatech.secure.client.model.Pkcs7ConversionStreamRequest conversionRequest, File outputFile)
    Performs a complete PKCS#7-to-JOSE migration workflow with analysis and conversion.

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

  • Method Details

    • analyzePkcs7

      public co.ankatech.secure.client.model.Pkcs7AnalysisResponse analyzePkcs7(co.ankatech.secure.client.model.Pkcs7AnalysisRequest request) throws AnkaSecureSdkException
      Analyzes a PKCS#7 structure (compact mode).
      Throws:
      AnkaSecureSdkException
    • analyzePkcs7Stream

      public co.ankatech.secure.client.model.Pkcs7AnalysisResponse analyzePkcs7Stream(File file) throws AnkaSecureSdkException
      Analyzes a PKCS#7 structure (streaming mode for large files).

      The file is streamed, never loaded into memory. Analysis is structural and takes no key and no option, so the caller supplies only the file; the request always carries the required metadata part (the empty JSON object) ahead of the file part.

      Parameters:
      file - PKCS#7/CMS file to analyze; must not be null and must be readable
      Returns:
      the analysis of the structure; never null
      Throws:
      LocalFileException - if file does not exist or cannot be read (raised before any request is sent)
      AnkaSecureSdkException - if the file is not valid PKCS#7 or the server returns an error
      NullPointerException - if file is null
    • convertPkcs7ToJose

      public co.ankatech.secure.client.model.Pkcs7ConversionResponse convertPkcs7ToJose(co.ankatech.secure.client.model.Pkcs7ConversionRequest request) throws AnkaSecureSdkException
      Converts PKCS#7 signed-data to JOSE JWS format (compact mode).
      Throws:
      AnkaSecureSdkException
    • convertPkcs7ToJoseStream

      public File convertPkcs7ToJoseStream(co.ankatech.secure.client.model.Pkcs7ConversionStreamRequest metadata, File inputFile, File outputFile) throws AnkaSecureSdkException
      Converts PKCS#7 signed-data to JOSE JWS format (streaming mode for large files).
      Throws:
      AnkaSecureSdkException
    • performMigrationWorkflow

      public MigrationWorkflowResult performMigrationWorkflow(File pkcs7File, co.ankatech.secure.client.model.Pkcs7ConversionStreamRequest conversionRequest, File outputFile) throws AnkaSecureSdkException
      Performs a complete PKCS#7-to-JOSE migration workflow with analysis and conversion.
      Throws:
      AnkaSecureSdkException