]> git.saurik.com Git - apple/security.git/blob - OSX/libsecurity_cryptkit/lib/NSDESCryptor.h
Security-58286.1.32.tar.gz
[apple/security.git] / OSX / libsecurity_cryptkit / lib / NSDESCryptor.h
1 /* Copyright (c) 1998,2011,2014 Apple Inc. All Rights Reserved.
2 *
3 * NOTICE: USE OF THE MATERIALS ACCOMPANYING THIS NOTICE IS SUBJECT
4 * TO THE TERMS OF THE SIGNED "FAST ELLIPTIC ENCRYPTION (FEE) REFERENCE
5 * SOURCE CODE EVALUATION AGREEMENT" BETWEEN APPLE, INC. AND THE
6 * ORIGINAL LICENSEE THAT OBTAINED THESE MATERIALS FROM APPLE,
7 * INC. ANY USE OF THESE MATERIALS NOT PERMITTED BY SUCH AGREEMENT WILL
8 * EXPOSE YOU TO LIABILITY.
9 ***************************************************************************
10 *
11 * NSDESCryptor.h created by blaine on Thu 22-Feb-1996
12 */
13
14 #import "NSCryptors.h"
15
16 /****** Digital Encryption Standard/Algorithm ********/
17
18 @interface NSDESCryptor : NSObject <NSCryptor>
19 {
20 void *_priv;
21 }
22
23 + cryptorWithState:(NSData *)s;
24
25 - initWithState:(NSData *)state;
26 // designated initializer
27 // 8 bytes with most sig bit ignored: 56 bits
28
29 - (void)setCryptorState:(NSData *)state; // reset
30 - (void)setBlockMode:(BOOL)yorn; // default is chaining mode
31
32 /*
33 * NSCryptor methods
34 */
35 - (NSData *)encryptData:(NSData *)input;
36 - (NSData *)decryptData:(NSData *)input;
37 - (unsigned)keyBitsize;
38
39 @end