You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@apr.apache.org by rb...@locus.apache.org on 2000/12/05 02:12:30 UTC

cvs commit: apr-util/src/encoding Makefile.in ap_base64.c ap_sha1.c

rbb         00/12/04 17:12:30

  Modified:    include  ap_base64.h ap_sha1.h
               src/encoding Makefile.in ap_base64.c ap_sha1.c
  Log:
  Get SHA1 and Base64 building as a part of apr-utils
  
  Revision  Changes    Path
  1.9       +7 -7      apr-util/include/ap_base64.h
  
  Index: ap_base64.h
  ===================================================================
  RCS file: /home/cvs/apr-util/include/ap_base64.h,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- ap_base64.h	2000/10/16 06:04:33	1.8
  +++ ap_base64.h	2000/12/05 01:12:26	1.9
  @@ -59,7 +59,7 @@
   #ifndef APACHE_BASE64_H
   #define APACHE_BASE64_H
   
  -#include "ap_config.h"
  +#include "apr_general.h"
   
   #ifdef __cplusplus
   extern "C" {
  @@ -88,7 +88,7 @@
    * @return the length of the string after it is encrypted
    * @deffunc int ap_base64encode_len(int len)
    */ 
  -AP_DECLARE(int) ap_base64encode_len(int len);
  +APR_DECLARE(int) ap_base64encode_len(int len);
   
   /**
    * Encode a text string using base64encoding.
  @@ -98,7 +98,7 @@
    * @return the length of the encoded string
    * @deffunc int ap_base64encode(char *coded_dst, const char *plain_src, int len_plain_src)
    */ 
  -AP_DECLARE(int) ap_base64encode(char * coded_dst, const char *plain_src,int len_plain_src);
  +APR_DECLARE(int) ap_base64encode(char * coded_dst, const char *plain_src,int len_plain_src);
   
   /**
    * Encode an EBCDIC string using base64encoding.
  @@ -108,7 +108,7 @@
    * @return the length of the encoded string
    * @deffunc int ap_base64encode_binary(char *coded_dst, const char *plain_src, int len_plain_src)
    */ 
  -AP_DECLARE(int) ap_base64encode_binary(char * coded_dst, const unsigned char *plain_src,int len_plain_src);
  +APR_DECLARE(int) ap_base64encode_binary(char * coded_dst, const unsigned char *plain_src,int len_plain_src);
   
   /**
    * Determine the length of a plain text string given the encoded version
  @@ -116,7 +116,7 @@
    * @return the length of the plain text string
    * @deffunc int ap_base64decode_len(const char *coded_src)
    */ 
  -AP_DECLARE(int) ap_base64decode_len(const char * coded_src);
  +APR_DECLARE(int) ap_base64decode_len(const char * coded_src);
   
   /**
    * Decode a string to plain text
  @@ -125,7 +125,7 @@
    * @return the length of the plain text string
    * @deffunc int ap_base64decode(char *plain_dst, const char *coded_src)
    */ 
  -AP_DECLARE(int) ap_base64decode(char * plain_dst, const char *coded_src);
  +APR_DECLARE(int) ap_base64decode(char * plain_dst, const char *coded_src);
   
   /**
    * Decode an EBCDIC string to plain text
  @@ -134,7 +134,7 @@
    * @return the length of the plain text string
    * @deffunc int ap_base64decode_binary(char *plain_dst, const char *coded_src)
    */ 
  -AP_DECLARE(int) ap_base64decode_binary(unsigned char * plain_dst, const char *coded_src);
  +APR_DECLARE(int) ap_base64decode_binary(unsigned char * plain_dst, const char *coded_src);
   
   #ifdef __cplusplus
   }
  
  
  
  1.12      +6 -6      apr-util/include/ap_sha1.h
  
  Index: ap_sha1.h
  ===================================================================
  RCS file: /home/cvs/apr-util/include/ap_sha1.h,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- ap_sha1.h	2000/10/16 06:04:33	1.11
  +++ ap_sha1.h	2000/12/05 01:12:26	1.12
  @@ -61,7 +61,7 @@
   #ifndef APACHE_SHA1_H
   #define APACHE_SHA1_H
   
  -#include "ap_config.h"
  +#include "apr_general.h"
   
   #ifdef __cplusplus
   extern "C" {
  @@ -115,14 +115,14 @@
    *     to break since the search space is smaller.
    * @deffunc void ap_sha1_base64(const char *clear, int len, char *out)
    */
  -AP_DECLARE(void) ap_sha1_base64(const char *clear, int len, char *out);
  +APR_DECLARE(void) ap_sha1_base64(const char *clear, int len, char *out);
   
   /**
    * Initialize the SHA digest
    * @param context The SHA context to initialize
    * @deffunc void ap_SHA1Init(AP_SHA1_CTX *context);
    */
  -AP_DECLARE(void) ap_SHA1Init(AP_SHA1_CTX *context);
  +APR_DECLARE(void) ap_SHA1Init(AP_SHA1_CTX *context);
   
   /**
    * Update the SHA digest
  @@ -131,7 +131,7 @@
    * @param inputLen The length of the input buffer
    * @deffunc void ap_SHA1Update(AP_SHA1_CTX *context, const char *input, unsigned int inputLen)
    */
  -AP_DECLARE(void) ap_SHA1Update(AP_SHA1_CTX *context, const char *input,
  +APR_DECLARE(void) ap_SHA1Update(AP_SHA1_CTX *context, const char *input,
                                 unsigned int inputLen);
   
   /**
  @@ -141,7 +141,7 @@
    * @param inputLen The length of the input buffer
    * @deffunc void ap_SHA1Update_binary(AP_SHA1_CTX *context, const unsigned char *input, unsigned int inputLen)
    */
  -AP_DECLARE(void) ap_SHA1Update_binary(AP_SHA1_CTX *context,
  +APR_DECLARE(void) ap_SHA1Update_binary(AP_SHA1_CTX *context,
                                        const unsigned char *input,
                                        unsigned int inputLen);
   
  @@ -151,7 +151,7 @@
    * @param context The context to finalize
    * @deffunc void ap_SHA1Final(unsigned char digest[SHA_DIGESTSIZE], AP_SHA1_CTX *context)
    */
  -AP_DECLARE(void) ap_SHA1Final(unsigned char digest[SHA_DIGESTSIZE],
  +APR_DECLARE(void) ap_SHA1Final(unsigned char digest[SHA_DIGESTSIZE],
                                AP_SHA1_CTX *context);
   
   #ifdef __cplusplus
  
  
  
  1.2       +2 -0      apr-util/src/encoding/Makefile.in
  
  Index: Makefile.in
  ===================================================================
  RCS file: /home/cvs/apr-util/src/encoding/Makefile.in,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- Makefile.in	2000/12/02 16:13:49	1.1
  +++ Makefile.in	2000/12/05 01:12:28	1.2
  @@ -1,3 +1,5 @@
   
  +TARGETS=ap_base64.lo ap_sha1.lo
  +
   top_builddir = @top_builddir@
   include $(top_builddir)/build/rules.mk
  
  
  
  1.15      +7 -8      apr-util/src/encoding/ap_base64.c
  
  Index: ap_base64.c
  ===================================================================
  RCS file: /home/cvs/apr-util/src/encoding/ap_base64.c,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- ap_base64.c	2000/10/16 06:04:28	1.14
  +++ ap_base64.c	2000/12/05 01:12:28	1.15
  @@ -62,7 +62,6 @@
    * ugly 'len' functions, which is quite a nasty cost.
    */
   
  -#include "ap_config.h"
   #include "ap_base64.h"
   #ifdef CHARSET_EBCDIC
   #include "apr_xlate.h"
  @@ -114,7 +113,7 @@
   static apr_xlate_t *xlate_to_ebcdic;
   static unsigned char os_toascii[256];
   
  -AP_DECLARE(apr_status_t) ap_base64init_ebcdic(apr_xlate_t *to_ascii,
  +APR_DECLARE(apr_status_t) ap_base64init_ebcdic(apr_xlate_t *to_ascii,
                                                apr_xlate_t *to_ebcdic)
   {
       int i;
  @@ -150,7 +149,7 @@
   }
   #endif /*CHARSET_EBCDIC*/
   
  -AP_DECLARE(int) ap_base64decode_len(const char *bufcoded)
  +APR_DECLARE(int) ap_base64decode_len(const char *bufcoded)
   {
       int nbytesdecoded;
       register const unsigned char *bufin;
  @@ -165,7 +164,7 @@
       return nbytesdecoded + 1;
   }
   
  -AP_DECLARE(int) ap_base64decode(char *bufplain, const char *bufcoded)
  +APR_DECLARE(int) ap_base64decode(char *bufplain, const char *bufcoded)
   {
   #ifdef CHARSET_EBCDIC
       apr_size_t inbytes_left, outbytes_left;
  @@ -185,7 +184,7 @@
   /* This is the same as ap_base64decode() except on EBCDIC machines, where
    * the conversion of the output to ebcdic is left out.
    */
  -AP_DECLARE(int) ap_base64decode_binary(unsigned char *bufplain,
  +APR_DECLARE(int) ap_base64decode_binary(unsigned char *bufplain,
   				   const char *bufcoded)
   {
       int nbytesdecoded;
  @@ -233,12 +232,12 @@
   static const char basis_64[] =
       "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
   
  -AP_DECLARE(int) ap_base64encode_len(int len)
  +APR_DECLARE(int) ap_base64encode_len(int len)
   {
       return ((len + 2) / 3 * 4) + 1;
   }
   
  -AP_DECLARE(int) ap_base64encode(char *encoded, const char *string, int len)
  +APR_DECLARE(int) ap_base64encode(char *encoded, const char *string, int len)
   {
   #ifndef CHARSET_EBCDIC
       return ap_base64encode_binary(encoded, (const unsigned char *) string, len);
  @@ -277,7 +276,7 @@
   /* This is the same as ap_base64encode() except on EBCDIC machines, where
    * the conversion of the input to ascii is left out.
    */
  -AP_DECLARE(int) ap_base64encode_binary(char *encoded,
  +APR_DECLARE(int) ap_base64encode_binary(char *encoded,
                                         const unsigned char *string, int len)
   {
       int i;
  
  
  
  1.16      +6 -7      apr-util/src/encoding/ap_sha1.c
  
  Index: ap_sha1.c
  ===================================================================
  RCS file: /home/cvs/apr-util/src/encoding/ap_sha1.c,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- ap_sha1.c	2000/10/16 06:04:29	1.15
  +++ ap_sha1.c	2000/12/05 01:12:28	1.16
  @@ -82,7 +82,6 @@
    *	This code is hereby placed in the public domain
    */
   
  -#include "ap_config.h"
   #include "ap_sha1.h"
   #include "ap_base64.h"
   #include "apr_strings.h"
  @@ -122,7 +121,7 @@
   #ifdef CHARSET_EBCDIC
   static apr_xlate_t *ebcdic2ascii_xlate;
   
  -AP_DECLARE(apr_status_t) ap_SHA1InitEBCDIC(apr_xlate_t *x)
  +APR_DECLARE(apr_status_t) ap_SHA1InitEBCDIC(apr_xlate_t *x)
   {
       apr_status_t rv;
       int onoff;
  @@ -243,7 +242,7 @@
   
   /* initialize the SHA digest */
   
  -AP_DECLARE(void) ap_SHA1Init(AP_SHA1_CTX *sha_info)
  +APR_DECLARE(void) ap_SHA1Init(AP_SHA1_CTX *sha_info)
   {
       sha_info->digest[0] = 0x67452301L;
       sha_info->digest[1] = 0xefcdab89L;
  @@ -257,7 +256,7 @@
   
   /* update the SHA digest */
   
  -AP_DECLARE(void) ap_SHA1Update_binary(AP_SHA1_CTX *sha_info,
  +APR_DECLARE(void) ap_SHA1Update_binary(AP_SHA1_CTX *sha_info,
                                        const unsigned char *buffer,
                                        unsigned int count)
   {
  @@ -296,7 +295,7 @@
       sha_info->local = count;
   }
   
  -AP_DECLARE(void) ap_SHA1Update(AP_SHA1_CTX *sha_info, const char *buf,
  +APR_DECLARE(void) ap_SHA1Update(AP_SHA1_CTX *sha_info, const char *buf,
                                 unsigned int count)
   {
   #ifdef CHARSET_EBCDIC
  @@ -350,7 +349,7 @@
   
   /* finish computing the SHA digest */
   
  -AP_DECLARE(void) ap_SHA1Final(unsigned char digest[SHA_DIGESTSIZE],
  +APR_DECLARE(void) ap_SHA1Final(unsigned char digest[SHA_DIGESTSIZE],
                                AP_SHA1_CTX *sha_info)
   {
       int count, i, j;
  @@ -385,7 +384,7 @@
   }
   
   
  -AP_DECLARE(void) ap_sha1_base64(const char *clear, int len, char *out)
  +APR_DECLARE(void) ap_sha1_base64(const char *clear, int len, char *out)
   {
       int l;
       AP_SHA1_CTX context;