189 lines
8.0 KiB
Objective-C

// Copyright 2019-2023 Hugo Pointcheval
//
// Use of this source code is governed by an MIT-style
// license that can be found in the LICENSE file or at
// https://opensource.org/licenses/MIT.
// --
// Autogenerated from Pigeon (v9.0.0), do not edit directly.
// See also: https://pub.dev/packages/pigeon
#import <Foundation/Foundation.h>
@protocol FlutterBinaryMessenger;
@protocol FlutterMessageCodec;
@class FlutterError;
@class FlutterStandardTypedData;
NS_ASSUME_NONNULL_BEGIN
@class HashRequest;
@class HashResponse;
@class HmacRequest;
@class HmacResponse;
@class GenerateSecureRandomRequest;
@class GenerateSecureRandomResponse;
@class Pbkdf2Request;
@class Pbkdf2Response;
@class EncryptRequest;
@class EncryptResponse;
@class DecryptRequest;
@class DecryptResponse;
@class EncryptFileRequest;
@class EncryptFileResponse;
@class DecryptFileRequest;
@class DecryptFileResponse;
@class EncryptWithIVRequest;
@interface HashRequest : NSObject
+ (instancetype)makeWithData:(nullable FlutterStandardTypedData *)data
algorithm:(nullable NSString *)algorithm;
@property(nonatomic, strong, nullable) FlutterStandardTypedData * data;
@property(nonatomic, copy, nullable) NSString * algorithm;
@end
@interface HashResponse : NSObject
+ (instancetype)makeWithHash:(nullable FlutterStandardTypedData *)hash;
@property(nonatomic, strong, nullable) FlutterStandardTypedData * hash;
@end
@interface HmacRequest : NSObject
+ (instancetype)makeWithData:(nullable FlutterStandardTypedData *)data
key:(nullable FlutterStandardTypedData *)key
algorithm:(nullable NSString *)algorithm;
@property(nonatomic, strong, nullable) FlutterStandardTypedData * data;
@property(nonatomic, strong, nullable) FlutterStandardTypedData * key;
@property(nonatomic, copy, nullable) NSString * algorithm;
@end
@interface HmacResponse : NSObject
+ (instancetype)makeWithHmac:(nullable FlutterStandardTypedData *)hmac;
@property(nonatomic, strong, nullable) FlutterStandardTypedData * hmac;
@end
@interface GenerateSecureRandomRequest : NSObject
+ (instancetype)makeWithLength:(nullable NSNumber *)length;
@property(nonatomic, strong, nullable) NSNumber * length;
@end
@interface GenerateSecureRandomResponse : NSObject
+ (instancetype)makeWithRandom:(nullable FlutterStandardTypedData *)random;
@property(nonatomic, strong, nullable) FlutterStandardTypedData * random;
@end
@interface Pbkdf2Request : NSObject
+ (instancetype)makeWithPassword:(nullable FlutterStandardTypedData *)password
salt:(nullable FlutterStandardTypedData *)salt
length:(nullable NSNumber *)length
iterations:(nullable NSNumber *)iterations
hashAlgorithm:(nullable NSString *)hashAlgorithm;
@property(nonatomic, strong, nullable) FlutterStandardTypedData * password;
@property(nonatomic, strong, nullable) FlutterStandardTypedData * salt;
@property(nonatomic, strong, nullable) NSNumber * length;
@property(nonatomic, strong, nullable) NSNumber * iterations;
@property(nonatomic, copy, nullable) NSString * hashAlgorithm;
@end
@interface Pbkdf2Response : NSObject
+ (instancetype)makeWithKey:(nullable FlutterStandardTypedData *)key;
@property(nonatomic, strong, nullable) FlutterStandardTypedData * key;
@end
@interface EncryptRequest : NSObject
+ (instancetype)makeWithPlainText:(nullable FlutterStandardTypedData *)plainText
key:(nullable FlutterStandardTypedData *)key
algorithm:(nullable NSString *)algorithm;
@property(nonatomic, strong, nullable) FlutterStandardTypedData * plainText;
@property(nonatomic, strong, nullable) FlutterStandardTypedData * key;
@property(nonatomic, copy, nullable) NSString * algorithm;
@end
@interface EncryptResponse : NSObject
+ (instancetype)makeWithCipherText:(nullable FlutterStandardTypedData *)cipherText;
@property(nonatomic, strong, nullable) FlutterStandardTypedData * cipherText;
@end
@interface DecryptRequest : NSObject
+ (instancetype)makeWithCipherText:(nullable FlutterStandardTypedData *)cipherText
key:(nullable FlutterStandardTypedData *)key
algorithm:(nullable NSString *)algorithm;
@property(nonatomic, strong, nullable) FlutterStandardTypedData * cipherText;
@property(nonatomic, strong, nullable) FlutterStandardTypedData * key;
@property(nonatomic, copy, nullable) NSString * algorithm;
@end
@interface DecryptResponse : NSObject
+ (instancetype)makeWithPlainText:(nullable FlutterStandardTypedData *)plainText;
@property(nonatomic, strong, nullable) FlutterStandardTypedData * plainText;
@end
@interface EncryptFileRequest : NSObject
+ (instancetype)makeWithPlainTextPath:(nullable NSString *)plainTextPath
cipherTextPath:(nullable NSString *)cipherTextPath
key:(nullable FlutterStandardTypedData *)key
algorithm:(nullable NSString *)algorithm;
@property(nonatomic, copy, nullable) NSString * plainTextPath;
@property(nonatomic, copy, nullable) NSString * cipherTextPath;
@property(nonatomic, strong, nullable) FlutterStandardTypedData * key;
@property(nonatomic, copy, nullable) NSString * algorithm;
@end
@interface EncryptFileResponse : NSObject
+ (instancetype)makeWithSuccess:(nullable NSNumber *)success;
@property(nonatomic, strong, nullable) NSNumber * success;
@end
@interface DecryptFileRequest : NSObject
+ (instancetype)makeWithCipherTextPath:(nullable NSString *)cipherTextPath
plainTextPath:(nullable NSString *)plainTextPath
key:(nullable FlutterStandardTypedData *)key
algorithm:(nullable NSString *)algorithm;
@property(nonatomic, copy, nullable) NSString * cipherTextPath;
@property(nonatomic, copy, nullable) NSString * plainTextPath;
@property(nonatomic, strong, nullable) FlutterStandardTypedData * key;
@property(nonatomic, copy, nullable) NSString * algorithm;
@end
@interface DecryptFileResponse : NSObject
+ (instancetype)makeWithSuccess:(nullable NSNumber *)success;
@property(nonatomic, strong, nullable) NSNumber * success;
@end
@interface EncryptWithIVRequest : NSObject
+ (instancetype)makeWithPlainText:(nullable FlutterStandardTypedData *)plainText
iv:(nullable FlutterStandardTypedData *)iv
key:(nullable FlutterStandardTypedData *)key
algorithm:(nullable NSString *)algorithm;
@property(nonatomic, strong, nullable) FlutterStandardTypedData * plainText;
@property(nonatomic, strong, nullable) FlutterStandardTypedData * iv;
@property(nonatomic, strong, nullable) FlutterStandardTypedData * key;
@property(nonatomic, copy, nullable) NSString * algorithm;
@end
/// The codec used by NativeCryptoAPI.
NSObject<FlutterMessageCodec> *NativeCryptoAPIGetCodec(void);
@protocol NativeCryptoAPI
/// @return `nil` only when `error != nil`.
- (nullable HashResponse *)hashRequest:(HashRequest *)request error:(FlutterError *_Nullable *_Nonnull)error;
/// @return `nil` only when `error != nil`.
- (nullable HmacResponse *)hmacRequest:(HmacRequest *)request error:(FlutterError *_Nullable *_Nonnull)error;
/// @return `nil` only when `error != nil`.
- (nullable GenerateSecureRandomResponse *)generateSecureRandomRequest:(GenerateSecureRandomRequest *)request error:(FlutterError *_Nullable *_Nonnull)error;
/// @return `nil` only when `error != nil`.
- (nullable Pbkdf2Response *)pbkdf2Request:(Pbkdf2Request *)request error:(FlutterError *_Nullable *_Nonnull)error;
/// @return `nil` only when `error != nil`.
- (nullable EncryptResponse *)encryptRequest:(EncryptRequest *)request error:(FlutterError *_Nullable *_Nonnull)error;
/// @return `nil` only when `error != nil`.
- (nullable DecryptResponse *)decryptRequest:(DecryptRequest *)request error:(FlutterError *_Nullable *_Nonnull)error;
/// @return `nil` only when `error != nil`.
- (nullable EncryptFileResponse *)encryptFileRequest:(EncryptFileRequest *)request error:(FlutterError *_Nullable *_Nonnull)error;
/// @return `nil` only when `error != nil`.
- (nullable DecryptFileResponse *)decryptFileRequest:(DecryptFileRequest *)request error:(FlutterError *_Nullable *_Nonnull)error;
/// @return `nil` only when `error != nil`.
- (nullable EncryptResponse *)encryptWithIVRequest:(EncryptWithIVRequest *)request error:(FlutterError *_Nullable *_Nonnull)error;
@end
extern void NativeCryptoAPISetup(id<FlutterBinaryMessenger> binaryMessenger, NSObject<NativeCryptoAPI> *_Nullable api);
NS_ASSUME_NONNULL_END