* ccrc4.h
* corecrypto
*
- * Created by Fabrice Gautier on 12/22/10.
- * Copyright 2010,2011 Apple, Inc. All rights reserved.
+ * Created on 12/22/2010
+ *
+ * Copyright (c) 2010,2011,2012,2013,2014,2015 Apple Inc. All rights reserved.
*
*/
cc_aligned_struct(16) ccrc4_ctx;
-/* Declare a gcm key named _name_. Pass the size field of a struct ccmode_gcm
+/* Declare a rc4 key named _name_. Pass the size field of a struct ccmode_ecb
for _size_. */
#define ccrc4_ctx_decl(_size_, _name_) cc_ctx_decl(ccrc4_ctx, _size_, _name_)
-#define ccrc4_ctx_clear(_size_, _name_) cc_ctx_clear(ccrc4_ctx, _size_, _name_)
+#define ccrc4_ctx_clear(_size_, _name_) cc_clear(_size_, _name_)
struct ccrc4_info {
size_t size; /* first argument to ccrc4_ctx_decl(). */
- void (*init)(ccrc4_ctx *ctx, unsigned long key_len, const void *key);
- void (*crypt)(ccrc4_ctx *ctx, unsigned long nbytes, const void *in, void *out);
+ void (*init)(ccrc4_ctx *ctx, size_t key_len, const void *key);
+ void (*crypt)(ccrc4_ctx *ctx, size_t nbytes, const void *in, void *out);
};
extern const struct ccrc4_info ccrc4_eay;
struct ccrc4_vector {
- unsigned long keylen;
+ size_t keylen;
const void *key;
- unsigned long datalen;
+ size_t datalen;
const void *pt;
const void *ct;
};