import type { NobjcObject } from "objc-js";
import type { _TKTokenAuthOperation } from "./TKTokenAuthOperation.js";
import type { _TKTokenKeyAlgorithm } from "./TKTokenKeyAlgorithm.js";
import type { _TKTokenKeyExchangeParameters } from "./TKTokenKeyExchangeParameters.js";
import type { _TKTokenSession } from "./TKTokenSession.js";
import type { _NSData } from "../Foundation/NSData.js";
import type { TKTokenOperation } from "./TKTokenOperation.js";
export interface _TKTokenSessionDelegate {
    /**
     * @discussion Establishes a context for the requested authentication operation. @param session Related TKTokenSession instance. @param operation Identifier of the operation. @param constraint Constraint to be satisfied by this authentication operation. @param error Error details (see TKError.h). @return authOperation Resulting context of the operation, which will be eventually finalized by receiving 'finishWithError:'. The resulting 'authOperation' can be of any type based on TKTokenAuthOperation. For known types (e.g. TKTokenPasswordAuthOperation) the system will first fill in the context-specific properties (e.g. 'password') before triggering 'finishWithError:'. When no authentication is actually needed (typically because the session is already authenticated for requested constraint), return instance of TKTokenAuthOperation class instead of any specific subclass.
     */
    tokenSession$beginAuthForOperation$constraint$error$?(session: _TKTokenSession, operation: TKTokenOperation, constraint: NobjcObject, error: NobjcObject | null): _TKTokenAuthOperation | null;
    /**
     * @discussion Checks whether specified operation and algorithm is supported on specified key. @param session Related TKTokenSession instance. @param operation Type of cryptographic operation for which the list of supported algorithms should be retrieved. @param keyObjectID Identifier of the private key object. @param algorithm Algorithm with which the oepration should be performed. @return YES if the operation is supported, NO otherwise.
     */
    tokenSession$supportsOperation$usingKey$algorithm$?(session: _TKTokenSession, operation: TKTokenOperation, keyObjectID: NobjcObject, algorithm: _TKTokenKeyAlgorithm): boolean;
    /**
     * @discussion Performs cryptographic signature operation. @param session Related TKTokenSession instance. @param dataToSign Input data for the signature operation. @param keyObjectID Identifier of the private key object. @param algorithm Requested signature algorithm to be used. @param error Error details (see TKError.h). If authentication is required (by invoking beginAuthForOperation:), @c TKErrorCodeAuthenticationNeeded should be used. @return Resulting signature, or nil if an error happened.
     */
    tokenSession$signData$usingKey$algorithm$error$?(session: _TKTokenSession, dataToSign: _NSData, keyObjectID: NobjcObject, algorithm: _TKTokenKeyAlgorithm, error: NobjcObject | null): _NSData | null;
    /**
     * @discussion Decrypts ciphertext using private key. @param session Related TKTokenSession instance. @param ciphertext Encrypted data to decrypt. @param keyObjectID Identifier of the private key object. @param algorithm Requested encryption/decryption algorithm to be used. @param error Error details (see TKError.h). If authentication is required (by invoking beginAuthForOperation:), @c TKErrorCodeAuthenticationNeeded should be used. @return Resulting decrypted plaintext, or nil if an error happened.
     */
    tokenSession$decryptData$usingKey$algorithm$error$?(session: _TKTokenSession, ciphertext: _NSData, keyObjectID: NobjcObject, algorithm: _TKTokenKeyAlgorithm, error: NobjcObject | null): _NSData | null;
    /**
     * @discussion Performs Diffie-Hellman style key exchange operation. @param session Related TKTokenSession instance. @param otherPartyPublicKeyData Raw public data of other party public key. @param objectID Identifier of the private key object. @param algorithm Requested key exchange algorithm to be used. @param parameters Additional parameters for key exchange operation. Chosen algorithm dictates meaning of parameters. @param error Error details (see TKError.h). If authentication is required (by invoking beginAuthForOperation:), @c TKErrorCodeAuthenticationNeeded should be used. @return Result of key exchange operation, or nil if the operation failed.
     */
    tokenSession$performKeyExchangeWithPublicKey$usingKey$algorithm$parameters$error$?(session: _TKTokenSession, otherPartyPublicKeyData: _NSData, objectID: NobjcObject, algorithm: _TKTokenKeyAlgorithm, parameters: _TKTokenKeyExchangeParameters, error: NobjcObject | null): _NSData | null;
}
