CKKSItemEncrypter.h [plain text]
#ifndef CKKSItemEncrypter_h
#define CKKSItemEncrypter_h
#include <securityd/SecDbItem.h>
#if OCTAGON
@class CKKSItem;
@class CKKSMirrorEntry;
@class CKKSKey;
@class CKKSOutgoingQueueEntry;
@class CKKSAESSIVKey;
@class CKRecordZoneID;
#define CKKS_PADDING_MARK_BYTE 0x80
@interface CKKSItemEncrypter : NSObject {
}
+(CKKSItem*)encryptCKKSItem:(CKKSItem*)baseitem
dataDictionary:(NSDictionary *)dict
updatingCKKSItem:(CKKSItem*)olditem
parentkey:(CKKSKey *)parentkey
error:(NSError * __autoreleasing *) error;
+ (NSDictionary*) decryptItemToDictionary: (CKKSItem*) item error: (NSError * __autoreleasing *) error;
+ (NSData*) encryptDictionary: (NSDictionary*) dict key: (CKKSAESSIVKey*) key authenticatedData: (NSDictionary<NSString*, NSData*>*) ad error: (NSError * __autoreleasing *) error;
+ (NSDictionary*) decryptDictionary: (NSData*) encitem key: (CKKSAESSIVKey*) key authenticatedData: (NSDictionary<NSString*, NSData*>*) ad error: (NSError * __autoreleasing *) error;
+ (NSData *)padData:(NSData *)input blockSize:(NSUInteger)blockSize additionalBlock:(BOOL)extra;
+ (NSData *)removePaddingFromData:(NSData *)input;
@end
#endif // OCTAGON
#endif