* prng.c: Clean up some comments.
(enc): Use des3 now.
+ * decrypt.c, encrypt.c, hmac.c, make_checksum.c, nfold.c,
+ old_api_glue.c, string_to_key.c, verify_checksum.c: Use const
+ instead of krb5_const.
+
2001-01-29 Ken Raeburn <raeburn@mit.edu>
* make_checksum.c (krb5_c_make_checksum): Clear checksum contents
+2001-03-05 Ken Raeburn <raeburn@mit.edu>
+
+ * crc-32.h, crc.c, crc32.c: Use const instead of krb5_const.
+
1999-10-26 Wilfredo Sanchez <tritan@mit.edu>
* Makefile.in: Clean up usage of CFLAGS, CPPFLAGS, DEFS, DEFINES,
#define CRC32_CKSUM_LENGTH 4
void
-mit_crc32 PROTOTYPE((krb5_const krb5_pointer in, krb5_const size_t in_length,
+mit_crc32 PROTOTYPE((const krb5_pointer in, const size_t in_length,
unsigned long *c));
extern krb5_checksum_entry crc32_cksumtable_entry;
static krb5_error_code
crc32_sum_func PROTOTYPE((
- krb5_const krb5_pointer in,
- krb5_const size_t in_length,
- krb5_const krb5_pointer seed,
- krb5_const size_t seed_length,
+ const krb5_pointer in,
+ const size_t in_length,
+ const krb5_pointer seed,
+ const size_t seed_length,
krb5_checksum FAR *outcksum));
static krb5_error_code
crc32_verify_func PROTOTYPE((
- krb5_const krb5_checksum FAR *cksum,
- krb5_const krb5_pointer in,
- krb5_const size_t in_length,
- krb5_const krb5_pointer seed,
- krb5_const size_t seed_length));
+ const krb5_checksum FAR *cksum,
+ const krb5_pointer in,
+ const size_t in_length,
+ const krb5_pointer seed,
+ const size_t seed_length));
static krb5_error_code
crc32_sum_func(in, in_length, seed, seed_length, outcksum)
- krb5_const krb5_pointer in;
- krb5_const size_t in_length;
- krb5_const krb5_pointer seed;
- krb5_const size_t seed_length;
+ const krb5_pointer in;
+ const size_t in_length;
+ const krb5_pointer seed;
+ const size_t seed_length;
krb5_checksum FAR *outcksum;
{
register u_char *data;
static krb5_error_code
crc32_verify_func(cksum, in, in_length, seed, seed_length)
- krb5_const krb5_checksum FAR *cksum;
- krb5_const krb5_pointer in;
- krb5_const size_t in_length;
- krb5_const krb5_pointer seed;
- krb5_const size_t seed_length;
+ const krb5_checksum FAR *cksum;
+ const krb5_pointer in;
+ const size_t in_length;
+ const krb5_pointer seed;
+ const size_t seed_length;
{
register u_char *data;
register u_long c = 0;
void
mit_crc32(in, in_length, cksum)
- krb5_const krb5_pointer in;
- krb5_const size_t in_length;
+ const krb5_pointer in;
+ const size_t in_length;
unsigned long *cksum;
{
register u_char *data;
KRB5_DLLIMP krb5_error_code KRB5_CALLCONV
krb5_c_decrypt(context, key, usage, ivec, input, output)
krb5_context context;
- krb5_const krb5_keyblock *key;
+ const krb5_keyblock *key;
krb5_keyusage usage;
- krb5_const krb5_data *ivec;
- krb5_const krb5_enc_data *input;
+ const krb5_data *ivec;
+ const krb5_enc_data *input;
krb5_data *output;
{
int i;
+2001-03-05 Ken Raeburn <raeburn@mit.edu>
+
+ * checksum.c, derive.c, dk.h, dk_decrypt.c, dk_encrypt.c,
+ stringtokey.c: Use const instead of krb5_const.
+
2001-01-23 Ken Raeburn <raeburn@mit.edu>
* stringtokey.c (kerberos): Now const.
krb5_error_code
krb5_dk_make_checksum(hash, key, usage, input, output)
- krb5_const struct krb5_hash_provider *hash;
- krb5_const krb5_keyblock *key;
+ const struct krb5_hash_provider *hash;
+ const krb5_keyblock *key;
krb5_keyusage usage;
- krb5_const krb5_data *input;
+ const krb5_data *input;
krb5_data *output;
{
int i;
#ifdef ATHENA_DES3_KLUDGE
krb5_error_code
krb5_marc_dk_make_checksum(hash, key, usage, input, output)
- krb5_const struct krb5_hash_provider *hash;
- krb5_const krb5_keyblock *key;
+ const struct krb5_hash_provider *hash;
+ const krb5_keyblock *key;
krb5_keyusage usage;
- krb5_const krb5_data *input;
+ const krb5_data *input;
krb5_data *output;
{
int i;
krb5_error_code
krb5_derive_key(enc, inkey, outkey, in_constant)
- krb5_const struct krb5_enc_provider *enc;
- krb5_const krb5_keyblock *inkey;
+ const struct krb5_enc_provider *enc;
+ const krb5_keyblock *inkey;
krb5_keyblock *outkey;
- krb5_const krb5_data *in_constant;
+ const krb5_data *in_constant;
{
size_t blocksize, keybytes, keylength, n;
unsigned char *inblockdata, *outblockdata, *rawkey;
#include "k5-int.h"
void krb5_dk_encrypt_length
-KRB5_PROTOTYPE((krb5_const struct krb5_enc_provider *enc,
- krb5_const struct krb5_hash_provider *hash,
+KRB5_PROTOTYPE((const struct krb5_enc_provider *enc,
+ const struct krb5_hash_provider *hash,
size_t input, size_t *length));
krb5_error_code krb5_dk_encrypt
-KRB5_PROTOTYPE((krb5_const struct krb5_enc_provider *enc,
- krb5_const struct krb5_hash_provider *hash,
- krb5_const krb5_keyblock *key, krb5_keyusage usage,
- krb5_const krb5_data *ivec,
- krb5_const krb5_data *input, krb5_data *output));
+KRB5_PROTOTYPE((const struct krb5_enc_provider *enc,
+ const struct krb5_hash_provider *hash,
+ const krb5_keyblock *key, krb5_keyusage usage,
+ const krb5_data *ivec,
+ const krb5_data *input, krb5_data *output));
krb5_error_code krb5_dk_decrypt
-KRB5_PROTOTYPE((krb5_const struct krb5_enc_provider *enc,
- krb5_const struct krb5_hash_provider *hash,
- krb5_const krb5_keyblock *key, krb5_keyusage usage,
- krb5_const krb5_data *ivec, krb5_const krb5_data *input,
+KRB5_PROTOTYPE((const struct krb5_enc_provider *enc,
+ const struct krb5_hash_provider *hash,
+ const krb5_keyblock *key, krb5_keyusage usage,
+ const krb5_data *ivec, const krb5_data *input,
krb5_data *arg_output));
krb5_error_code krb5_dk_string_to_key
-KRB5_PROTOTYPE((krb5_const struct krb5_enc_provider *enc,
- krb5_const krb5_data *string, krb5_const krb5_data *salt,
+KRB5_PROTOTYPE((const struct krb5_enc_provider *enc,
+ const krb5_data *string, const krb5_data *salt,
krb5_keyblock *key));
krb5_error_code krb5_derive_key
-KRB5_PROTOTYPE((krb5_const struct krb5_enc_provider *enc,
- krb5_const krb5_keyblock *inkey,
- krb5_keyblock *outkey, krb5_const krb5_data *in_constant));
+KRB5_PROTOTYPE((const struct krb5_enc_provider *enc,
+ const krb5_keyblock *inkey,
+ krb5_keyblock *outkey, const krb5_data *in_constant));
krb5_error_code krb5_dk_make_checksum
-KRB5_PROTOTYPE((krb5_const struct krb5_hash_provider *hash,
- krb5_const krb5_keyblock *key, krb5_keyusage usage,
- krb5_const krb5_data *input, krb5_data *output));
+KRB5_PROTOTYPE((const struct krb5_hash_provider *hash,
+ const krb5_keyblock *key, krb5_keyusage usage,
+ const krb5_data *input, krb5_data *output));
#ifdef ATHENA_DES3_KLUDGE
void krb5_marc_dk_encrypt_length
-KRB5_PROTOTYPE((krb5_const struct krb5_enc_provider *enc,
- krb5_const struct krb5_hash_provider *hash,
+KRB5_PROTOTYPE((const struct krb5_enc_provider *enc,
+ const struct krb5_hash_provider *hash,
size_t input, size_t *length));
krb5_error_code krb5_marc_dk_encrypt
-KRB5_PROTOTYPE((krb5_const struct krb5_enc_provider *enc,
- krb5_const struct krb5_hash_provider *hash,
- krb5_const krb5_keyblock *key, krb5_keyusage usage,
- krb5_const krb5_data *ivec,
- krb5_const krb5_data *input, krb5_data *output));
+KRB5_PROTOTYPE((const struct krb5_enc_provider *enc,
+ const struct krb5_hash_provider *hash,
+ const krb5_keyblock *key, krb5_keyusage usage,
+ const krb5_data *ivec,
+ const krb5_data *input, krb5_data *output));
krb5_error_code krb5_marc_dk_decrypt
-KRB5_PROTOTYPE((krb5_const struct krb5_enc_provider *enc,
- krb5_const struct krb5_hash_provider *hash,
- krb5_const krb5_keyblock *key, krb5_keyusage usage,
- krb5_const krb5_data *ivec, krb5_const krb5_data *input,
+KRB5_PROTOTYPE((const struct krb5_enc_provider *enc,
+ const struct krb5_hash_provider *hash,
+ const krb5_keyblock *key, krb5_keyusage usage,
+ const krb5_data *ivec, const krb5_data *input,
krb5_data *arg_output));
krb5_error_code krb5_marc_dk_make_checksum
-KRB5_PROTOTYPE((krb5_const struct krb5_hash_provider *hash,
- krb5_const krb5_keyblock *key, krb5_keyusage usage,
- krb5_const krb5_data *input, krb5_data *output));
+KRB5_PROTOTYPE((const struct krb5_hash_provider *hash,
+ const krb5_keyblock *key, krb5_keyusage usage,
+ const krb5_data *input, krb5_data *output));
#endif /* ATHENA_DES3_KLUDGE */
krb5_error_code
krb5_dk_decrypt(enc, hash, key, usage, ivec, input, output)
- krb5_const struct krb5_enc_provider *enc;
- krb5_const struct krb5_hash_provider *hash;
- krb5_const krb5_keyblock *key;
+ const struct krb5_enc_provider *enc;
+ const struct krb5_hash_provider *hash;
+ const krb5_keyblock *key;
krb5_keyusage usage;
- krb5_const krb5_data *ivec;
- krb5_const krb5_data *input;
+ const krb5_data *ivec;
+ const krb5_data *input;
krb5_data *output;
{
krb5_error_code ret;
#ifdef ATHENA_DES3_KLUDGE
krb5_error_code
krb5_marc_dk_decrypt(enc, hash, key, usage, ivec, input, output)
- krb5_const struct krb5_enc_provider *enc;
- krb5_const struct krb5_hash_provider *hash;
- krb5_const krb5_keyblock *key;
+ const struct krb5_enc_provider *enc;
+ const struct krb5_hash_provider *hash;
+ const krb5_keyblock *key;
krb5_keyusage usage;
- krb5_const krb5_data *ivec;
- krb5_const krb5_data *input;
+ const krb5_data *ivec;
+ const krb5_data *input;
krb5_data *output;
{
krb5_error_code ret;
void
krb5_dk_encrypt_length(enc, hash, inputlen, length)
- krb5_const struct krb5_enc_provider *enc;
- krb5_const struct krb5_hash_provider *hash;
+ const struct krb5_enc_provider *enc;
+ const struct krb5_hash_provider *hash;
size_t inputlen;
size_t *length;
{
krb5_error_code
krb5_dk_encrypt(enc, hash, key, usage, ivec, input, output)
- krb5_const struct krb5_enc_provider *enc;
- krb5_const struct krb5_hash_provider *hash;
- krb5_const krb5_keyblock *key;
+ const struct krb5_enc_provider *enc;
+ const struct krb5_hash_provider *hash;
+ const krb5_keyblock *key;
krb5_keyusage usage;
- krb5_const krb5_data *ivec;
- krb5_const krb5_data *input;
+ const krb5_data *ivec;
+ const krb5_data *input;
krb5_data *output;
{
size_t blocksize, keybytes, keylength, plainlen, enclen;
#ifdef ATHENA_DES3_KLUDGE
void
krb5_marc_dk_encrypt_length(enc, hash, inputlen, length)
- krb5_const struct krb5_enc_provider *enc;
- krb5_const struct krb5_hash_provider *hash;
+ const struct krb5_enc_provider *enc;
+ const struct krb5_hash_provider *hash;
size_t inputlen;
size_t *length;
{
krb5_error_code
krb5_marc_dk_encrypt(enc, hash, key, usage, ivec, input, output)
- krb5_const struct krb5_enc_provider *enc;
- krb5_const struct krb5_hash_provider *hash;
- krb5_const krb5_keyblock *key;
+ const struct krb5_enc_provider *enc;
+ const struct krb5_hash_provider *hash;
+ const krb5_keyblock *key;
krb5_keyusage usage;
- krb5_const krb5_data *ivec;
- krb5_const krb5_data *input;
+ const krb5_data *ivec;
+ const krb5_data *input;
krb5_data *output;
{
size_t blocksize, keybytes, keylength, plainlen, enclen;
krb5_error_code
krb5_dk_string_to_key(enc, string, salt, key)
- krb5_const struct krb5_enc_provider *enc;
- krb5_const krb5_data *string;
- krb5_const krb5_data *salt;
+ const struct krb5_enc_provider *enc;
+ const krb5_data *string;
+ const krb5_data *salt;
krb5_keyblock *key;
{
krb5_error_code ret;
+2001-03-05 Ken Raeburn <raeburn@mit.edu>
+
+ * des.c, des3.c: Use const instead of krb5_const.
+
2000-06-28 Ezra Peisach <epeisach@mit.edu>
* des.c, des3.c: Remove unused variables.
}
static krb5_error_code
-k5_des_docrypt(krb5_const krb5_keyblock *key, krb5_const krb5_data *ivec,
- krb5_const krb5_data *input, krb5_data *output, int encrypt)
+k5_des_docrypt(const krb5_keyblock *key, const krb5_data *ivec,
+ const krb5_data *input, krb5_data *output, int encrypt)
{
mit_des_key_schedule schedule;
}
static krb5_error_code
-k5_des_encrypt(krb5_const krb5_keyblock *key, krb5_const krb5_data *ivec,
- krb5_const krb5_data *input, krb5_data *output)
+k5_des_encrypt(const krb5_keyblock *key, const krb5_data *ivec,
+ const krb5_data *input, krb5_data *output)
{
return(k5_des_docrypt(key, ivec, input, output, 1));
}
static krb5_error_code
-k5_des_decrypt(krb5_const krb5_keyblock *key, krb5_const krb5_data *ivec,
- krb5_const krb5_data *input, krb5_data *output)
+k5_des_decrypt(const krb5_keyblock *key, const krb5_data *ivec,
+ const krb5_data *input, krb5_data *output)
{
return(k5_des_docrypt(key, ivec, input, output, 0));
}
static krb5_error_code
-k5_des_make_key(krb5_const krb5_data *randombits, krb5_keyblock *key)
+k5_des_make_key(const krb5_data *randombits, krb5_keyblock *key)
{
if (key->length != 8)
return(KRB5_BAD_KEYSIZE);
}
static krb5_error_code
-k5_des3_docrypt(krb5_const krb5_keyblock *key, krb5_const krb5_data *ivec,
- krb5_const krb5_data *input, krb5_data *output, int encrypt)
+k5_des3_docrypt(const krb5_keyblock *key, const krb5_data *ivec,
+ const krb5_data *input, krb5_data *output, int encrypt)
{
mit_des3_key_schedule schedule;
}
static krb5_error_code
-k5_des3_encrypt(krb5_const krb5_keyblock *key, krb5_const krb5_data *ivec,
- krb5_const krb5_data *input, krb5_data *output)
+k5_des3_encrypt(const krb5_keyblock *key, const krb5_data *ivec,
+ const krb5_data *input, krb5_data *output)
{
return(k5_des3_docrypt(key, ivec, input, output, 1));
}
static krb5_error_code
-k5_des3_decrypt(krb5_const krb5_keyblock *key, krb5_const krb5_data *ivec,
- krb5_const krb5_data *input, krb5_data *output)
+k5_des3_decrypt(const krb5_keyblock *key, const krb5_data *ivec,
+ const krb5_data *input, krb5_data *output)
{
return(k5_des3_docrypt(key, ivec, input, output, 0));
}
static krb5_error_code
-k5_des3_make_key(krb5_const krb5_data *randombits, krb5_keyblock *key)
+k5_des3_make_key(const krb5_data *randombits, krb5_keyblock *key)
{
int i;
KRB5_DLLIMP krb5_error_code KRB5_CALLCONV
krb5_c_encrypt(context, key, usage, ivec, input, output)
krb5_context context;
- krb5_const krb5_keyblock *key;
+ const krb5_keyblock *key;
krb5_keyusage usage;
- krb5_const krb5_data *ivec;
- krb5_const krb5_data *input;
+ const krb5_data *ivec;
+ const krb5_data *input;
krb5_enc_data *output;
{
int i;
+2001-03-05 Ken Raeburn <raeburn@mit.edu>
+
+ * hash_crc32.c, hash_md4.c, hash_md5.c, hash_sha1.c: Use const
+ instead of krb5_const.
+
2000-10-17 Ezra Peisach <epeisach@mit.edu>
* hash_sha1.c (k5_sha1_hash): Cast length field in shsUpdate call
}
static krb5_error_code
-k5_crc32_hash(unsigned int icount, krb5_const krb5_data *input,
+k5_crc32_hash(unsigned int icount, const krb5_data *input,
krb5_data *output)
{
unsigned long c, cn;
}
static krb5_error_code
-k5_md4_hash(unsigned int icount, krb5_const krb5_data *input,
+k5_md4_hash(unsigned int icount, const krb5_data *input,
krb5_data *output)
{
krb5_MD4_CTX ctx;
}
static krb5_error_code
-k5_md5_hash(unsigned int icount, krb5_const krb5_data *input,
+k5_md5_hash(unsigned int icount, const krb5_data *input,
krb5_data *output)
{
krb5_MD5_CTX ctx;
}
static krb5_error_code
-k5_sha1_hash(unsigned int icount, krb5_const krb5_data *input,
+k5_sha1_hash(unsigned int icount, const krb5_data *input,
krb5_data *output)
{
SHS_INFO ctx;
krb5_error_code
krb5_hmac(hash, key, icount, input, output)
- krb5_const struct krb5_hash_provider *hash;
- krb5_const krb5_keyblock *key;
+ const struct krb5_hash_provider *hash;
+ const krb5_keyblock *key;
unsigned int icount;
- krb5_const krb5_data *input;
+ const krb5_data *input;
krb5_data *output;
{
size_t hashsize, blocksize;
+2001-03-05 Ken Raeburn <raeburn@mit.edu>
+
+ * descbc.c, k5_md4des.c, k5_md5des.c: Use const instead of
+ krb5_const.
+
2000-09-25 Ezra Peisach <epeisach@mit.edu>
* descbc.c, k5_md4des.c, k5_md5des.c, t_cksum.c: Cleanup unsigned
}
static krb5_error_code
-k5_descbc_hash(krb5_const krb5_keyblock *key, krb5_const krb5_data *ivec,
- krb5_const krb5_data *input, krb5_data *output)
+k5_descbc_hash(const krb5_keyblock *key, const krb5_data *ivec,
+ const krb5_data *input, krb5_data *output)
{
mit_des_key_schedule schedule;
that's less efficient, and there's no need for this to be generic */
static krb5_error_code
-k5_md4des_hash(krb5_const krb5_keyblock *key, krb5_const krb5_data *ivec,
- krb5_const krb5_data *input, krb5_data *output)
+k5_md4des_hash(const krb5_keyblock *key, const krb5_data *ivec,
+ const krb5_data *input, krb5_data *output)
{
krb5_error_code ret;
krb5_data data;
}
static krb5_error_code
-k5_md4des_verify(krb5_const krb5_keyblock *key, krb5_const krb5_data *ivec,
- krb5_const krb5_data *input, krb5_const krb5_data *hash,
+k5_md4des_verify(const krb5_keyblock *key, const krb5_data *ivec,
+ const krb5_data *input, const krb5_data *hash,
krb5_boolean *valid)
{
krb5_error_code ret;
that's less efficient, and there's no need for this to be generic */
static krb5_error_code
-k5_md5des_hash(krb5_const krb5_keyblock *key, krb5_const krb5_data *ivec,
- krb5_const krb5_data *input, krb5_data *output)
+k5_md5des_hash(const krb5_keyblock *key, const krb5_data *ivec,
+ const krb5_data *input, krb5_data *output)
{
krb5_error_code ret;
krb5_data data;
}
static krb5_error_code
-k5_md5des_verify(krb5_const krb5_keyblock *key, krb5_const krb5_data *ivec,
- krb5_const krb5_data *input, krb5_const krb5_data *hash,
+k5_md5des_verify(const krb5_keyblock *key, const krb5_data *ivec,
+ const krb5_data *input, const krb5_data *hash,
krb5_boolean *valid)
{
krb5_error_code ret;
krb5_c_make_checksum(context, cksumtype, key, usage, input, cksum)
krb5_context context;
krb5_cksumtype cksumtype;
- krb5_const krb5_keyblock *key;
+ const krb5_keyblock *key;
krb5_keyusage usage;
- krb5_const krb5_data *input;
+ const krb5_data *input;
krb5_checksum *cksum;
{
int i, e1, e2;
void
krb5_nfold(inbits, in, outbits, out)
unsigned int inbits;
- krb5_const unsigned char *in;
+ const unsigned char *in;
unsigned int outbits;
unsigned char *out;
{
+2001-03-05 Ken Raeburn <raeburn@mit.edu>
+
+ * des_stringtokey.c, old.h, old_decrypt.c, old_encrypt.c: Use
+ const instead of krb5_const.
+
2000-06-03 Tom Yu <tlyu@mit.edu>
* old_encrypt.c (krb5_old_encrypt): Chain ivecs.
krb5_error_code
krb5_des_string_to_key(enc, string, salt, key)
- krb5_const struct krb5_enc_provider *enc;
- krb5_const krb5_data *string;
- krb5_const krb5_data *salt;
+ const struct krb5_enc_provider *enc;
+ const krb5_data *string;
+ const krb5_data *salt;
krb5_keyblock *key;
{
return(mit_des_string_to_key_int(key, string, salt));
#include "k5-int.h"
void krb5_old_encrypt_length
-KRB5_PROTOTYPE((krb5_const struct krb5_enc_provider *enc,
- krb5_const struct krb5_hash_provider *hash,
+KRB5_PROTOTYPE((const struct krb5_enc_provider *enc,
+ const struct krb5_hash_provider *hash,
size_t input, size_t *length));
krb5_error_code krb5_old_encrypt
-KRB5_PROTOTYPE((krb5_const struct krb5_enc_provider *enc,
- krb5_const struct krb5_hash_provider *hash,
- krb5_const krb5_keyblock *key, krb5_keyusage usage,
- krb5_const krb5_data *ivec, krb5_const krb5_data *input,
+KRB5_PROTOTYPE((const struct krb5_enc_provider *enc,
+ const struct krb5_hash_provider *hash,
+ const krb5_keyblock *key, krb5_keyusage usage,
+ const krb5_data *ivec, const krb5_data *input,
krb5_data *output));
krb5_error_code krb5_old_decrypt
-KRB5_PROTOTYPE((krb5_const struct krb5_enc_provider *enc,
- krb5_const struct krb5_hash_provider *hash,
- krb5_const krb5_keyblock *key, krb5_keyusage usage,
- krb5_const krb5_data *ivec, krb5_const krb5_data *input,
+KRB5_PROTOTYPE((const struct krb5_enc_provider *enc,
+ const struct krb5_hash_provider *hash,
+ const krb5_keyblock *key, krb5_keyusage usage,
+ const krb5_data *ivec, const krb5_data *input,
krb5_data *arg_output));
krb5_error_code krb5_des_string_to_key
-KRB5_PROTOTYPE((krb5_const struct krb5_enc_provider *enc,
- krb5_const krb5_data *string, krb5_const krb5_data *salt,
+KRB5_PROTOTYPE((const struct krb5_enc_provider *enc,
+ const krb5_data *string, const krb5_data *salt,
krb5_keyblock *key));
krb5_error_code
krb5_old_decrypt(enc, hash, key, usage, ivec, input, arg_output)
- krb5_const struct krb5_enc_provider *enc;
- krb5_const struct krb5_hash_provider *hash;
- krb5_const krb5_keyblock *key;
+ const struct krb5_enc_provider *enc;
+ const struct krb5_hash_provider *hash;
+ const krb5_keyblock *key;
krb5_keyusage usage;
- krb5_const krb5_data *ivec;
- krb5_const krb5_data *input;
+ const krb5_data *ivec;
+ const krb5_data *input;
krb5_data *arg_output;
{
krb5_error_code ret;
void
krb5_old_encrypt_length(enc, hash, inputlen, length)
- krb5_const struct krb5_enc_provider *enc;
- krb5_const struct krb5_hash_provider *hash;
+ const struct krb5_enc_provider *enc;
+ const struct krb5_hash_provider *hash;
size_t inputlen;
size_t *length;
{
krb5_error_code
krb5_old_encrypt(enc, hash, key, usage, ivec, input, output)
- krb5_const struct krb5_enc_provider *enc;
- krb5_const struct krb5_hash_provider *hash;
- krb5_const krb5_keyblock *key;
+ const struct krb5_enc_provider *enc;
+ const struct krb5_hash_provider *hash;
+ const krb5_keyblock *key;
krb5_keyusage usage;
- krb5_const krb5_data *ivec;
- krb5_const krb5_data *input;
+ const krb5_data *ivec;
+ const krb5_data *input;
krb5_data *output;
{
krb5_error_code ret;
KRB5_DLLIMP krb5_error_code KRB5_CALLCONV
krb5_encrypt(context, inptr, outptr, size, eblock, ivec)
krb5_context context;
- krb5_const krb5_pointer inptr;
+ const krb5_pointer inptr;
krb5_pointer outptr;
- krb5_const size_t size;
+ const size_t size;
krb5_encrypt_block FAR * eblock;
krb5_pointer ivec;
{
KRB5_DLLIMP krb5_error_code KRB5_CALLCONV
krb5_decrypt(context, inptr, outptr, size, eblock, ivec)
krb5_context context;
- krb5_const krb5_pointer inptr;
+ const krb5_pointer inptr;
krb5_pointer outptr;
- krb5_const size_t size;
+ const size_t size;
krb5_encrypt_block FAR * eblock;
krb5_pointer ivec;
{
krb5_process_key(context, eblock, key)
krb5_context context;
krb5_encrypt_block FAR * eblock;
- krb5_const krb5_keyblock FAR * key;
+ const krb5_keyblock FAR * key;
{
eblock->key = (krb5_keyblock *) key;
KRB5_DLLIMP krb5_error_code KRB5_CALLCONV
krb5_string_to_key(context, eblock, keyblock, data, salt)
krb5_context context;
- krb5_const krb5_encrypt_block FAR * eblock;
+ const krb5_encrypt_block FAR * eblock;
krb5_keyblock FAR * keyblock;
- krb5_const krb5_data FAR * data;
- krb5_const krb5_data FAR * salt;
+ const krb5_data FAR * data;
+ const krb5_data FAR * salt;
{
return(krb5_c_string_to_key(context, eblock->crypto_entry, data, salt,
keyblock));
KRB5_DLLIMP krb5_error_code KRB5_CALLCONV
krb5_init_random_key(context, eblock, keyblock, ptr)
krb5_context context;
- krb5_const krb5_encrypt_block FAR * eblock;
- krb5_const krb5_keyblock FAR * keyblock;
+ const krb5_encrypt_block FAR * eblock;
+ const krb5_keyblock FAR * keyblock;
krb5_pointer FAR * ptr;
{
krb5_data data;
KRB5_DLLIMP krb5_error_code KRB5_CALLCONV
krb5_finish_random_key(context, eblock, ptr)
krb5_context context;
- krb5_const krb5_encrypt_block FAR * eblock;
+ const krb5_encrypt_block FAR * eblock;
krb5_pointer FAR * ptr;
{
return(0);
KRB5_DLLIMP krb5_error_code KRB5_CALLCONV
krb5_random_key(context, eblock, ptr, keyblock)
krb5_context context;
- krb5_const krb5_encrypt_block FAR * eblock;
+ const krb5_encrypt_block FAR * eblock;
krb5_pointer ptr;
krb5_keyblock FAR * FAR * keyblock;
{
KRB5_DLLIMP krb5_enctype KRB5_CALLCONV
krb5_eblock_enctype(context, eblock)
krb5_context context;
- krb5_const krb5_encrypt_block FAR * eblock;
+ const krb5_encrypt_block FAR * eblock;
{
return(eblock->crypto_entry);
}
krb5_use_enctype(context, eblock, enctype)
krb5_context context;
krb5_encrypt_block FAR * eblock;
- krb5_const krb5_enctype enctype;
+ const krb5_enctype enctype;
{
eblock->crypto_entry = enctype;
krb5_calculate_checksum(context, ctype, in, in_length,
seed, seed_length, outcksum)
krb5_context context;
- krb5_const krb5_cksumtype ctype;
- krb5_const krb5_pointer in;
- krb5_const size_t in_length;
- krb5_const krb5_pointer seed;
- krb5_const size_t seed_length;
+ const krb5_cksumtype ctype;
+ const krb5_pointer in;
+ const size_t in_length;
+ const krb5_pointer seed;
+ const size_t seed_length;
krb5_checksum FAR * outcksum;
{
krb5_data input;
seed, seed_length)
krb5_context context;
krb5_cksumtype ctype;
- krb5_const krb5_checksum FAR * cksum;
- krb5_const krb5_pointer in;
- krb5_const size_t in_length;
- krb5_const krb5_pointer seed;
- krb5_const size_t seed_length;
+ const krb5_checksum FAR * cksum;
+ const krb5_pointer in;
+ const size_t in_length;
+ const krb5_pointer seed;
+ const size_t seed_length;
{
krb5_data input;
krb5_keyblock key;
+2001-03-05 Ken Raeburn <raeburn@mit.edu>
+
+ * raw.h, raw_decrypt.c, raw_encrypt.c: Use const instead of
+ krb5_const.
+
1999-10-26 Wilfredo Sanchez <tritan@mit.edu>
* Makefile.in: Clean up usage of CFLAGS, CPPFLAGS, DEFS, DEFINES,
#include "k5-int.h"
void krb5_raw_encrypt_length
-KRB5_PROTOTYPE((krb5_const struct krb5_enc_provider *enc,
- krb5_const struct krb5_hash_provider *hash,
+KRB5_PROTOTYPE((const struct krb5_enc_provider *enc,
+ const struct krb5_hash_provider *hash,
size_t input, size_t *length));
krb5_error_code krb5_raw_encrypt
-KRB5_PROTOTYPE((krb5_const struct krb5_enc_provider *enc,
- krb5_const struct krb5_hash_provider *hash,
- krb5_const krb5_keyblock *key, krb5_keyusage usage,
- krb5_const krb5_data *ivec, krb5_const krb5_data *input,
+KRB5_PROTOTYPE((const struct krb5_enc_provider *enc,
+ const struct krb5_hash_provider *hash,
+ const krb5_keyblock *key, krb5_keyusage usage,
+ const krb5_data *ivec, const krb5_data *input,
krb5_data *output));
krb5_error_code krb5_raw_decrypt
-KRB5_PROTOTYPE((krb5_const struct krb5_enc_provider *enc,
- krb5_const struct krb5_hash_provider *hash,
- krb5_const krb5_keyblock *key, krb5_keyusage usage,
- krb5_const krb5_data *ivec, krb5_const krb5_data *input,
+KRB5_PROTOTYPE((const struct krb5_enc_provider *enc,
+ const struct krb5_hash_provider *hash,
+ const krb5_keyblock *key, krb5_keyusage usage,
+ const krb5_data *ivec, const krb5_data *input,
krb5_data *arg_output));
krb5_error_code
krb5_raw_decrypt(enc, hash, key, usage, ivec, input, output)
- krb5_const struct krb5_enc_provider *enc;
- krb5_const struct krb5_hash_provider *hash;
- krb5_const krb5_keyblock *key;
+ const struct krb5_enc_provider *enc;
+ const struct krb5_hash_provider *hash;
+ const krb5_keyblock *key;
krb5_keyusage usage;
- krb5_const krb5_data *ivec;
- krb5_const krb5_data *input;
+ const krb5_data *ivec;
+ const krb5_data *input;
krb5_data *output;
{
return((*(enc->decrypt))(key, ivec, input, output));
void
krb5_raw_encrypt_length(enc, hash, inputlen, length)
- krb5_const struct krb5_enc_provider *enc;
- krb5_const struct krb5_hash_provider *hash;
+ const struct krb5_enc_provider *enc;
+ const struct krb5_hash_provider *hash;
size_t inputlen;
size_t *length;
{
krb5_error_code
krb5_raw_encrypt(enc, hash, key, usage, ivec, input, output)
- krb5_const struct krb5_enc_provider *enc;
- krb5_const struct krb5_hash_provider *hash;
- krb5_const krb5_keyblock *key;
+ const struct krb5_enc_provider *enc;
+ const struct krb5_hash_provider *hash;
+ const krb5_keyblock *key;
krb5_keyusage usage;
- krb5_const krb5_data *ivec;
- krb5_const krb5_data *input;
+ const krb5_data *ivec;
+ const krb5_data *input;
krb5_data *output;
{
return((*(enc->encrypt))(key, ivec, input, output));
krb5_c_string_to_key(context, enctype, string, salt, key)
krb5_context context;
krb5_enctype enctype;
- krb5_const krb5_data *string;
- krb5_const krb5_data *salt;
+ const krb5_data *string;
+ const krb5_data *salt;
krb5_keyblock *key;
{
int i;
KRB5_DLLIMP krb5_error_code KRB5_CALLCONV
krb5_c_verify_checksum(context, key, usage, data, cksum, valid)
krb5_context context;
- krb5_const krb5_keyblock *key;
+ const krb5_keyblock *key;
krb5_keyusage usage;
- krb5_const krb5_data *data;
- krb5_const krb5_checksum *cksum;
+ const krb5_data *data;
+ const krb5_checksum *cksum;
krb5_boolean *valid;
{
int i;