commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mt...@apache.org
Subject svn commit: r803023 - in /commons/sandbox/runtime/trunk/src/main/native: include/acr_crypto.h os/win32/wutil.c shared/sha1.c
Date Tue, 11 Aug 2009 08:15:56 GMT
Author: mturk
Date: Tue Aug 11 08:15:56 2009
New Revision: 803023

URL: http://svn.apache.org/viewvc?rev=803023&view=rev
Log:
Rename Base16 to Encode

Modified:
    commons/sandbox/runtime/trunk/src/main/native/include/acr_crypto.h
    commons/sandbox/runtime/trunk/src/main/native/os/win32/wutil.c
    commons/sandbox/runtime/trunk/src/main/native/shared/sha1.c

Modified: commons/sandbox/runtime/trunk/src/main/native/include/acr_crypto.h
URL: http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/native/include/acr_crypto.h?rev=803023&r1=803022&r2=803023&view=diff
==============================================================================
--- commons/sandbox/runtime/trunk/src/main/native/include/acr_crypto.h (original)
+++ commons/sandbox/runtime/trunk/src/main/native/include/acr_crypto.h Tue Aug 11 08:15:56
2009
@@ -104,21 +104,21 @@
 
 /**
  * Provide a means to SHA1 crypt/encode a plaintext data using
- * base 16 encoding.
+ * base 16 hexadecimal encoding.
  * @param clear The plaintext data.
  * @param len The length of the plaintext data
  * @param out The encrypted/encoded password
  */
-ACR_DECLARE(char *) ACR_SHA1Base16A(const char *clear, size_t len, char *out);
+ACR_DECLARE(char *) ACR_SHA1EncodeA(const char *clear, size_t len, char *out);
 
 /**
  * Provide a means to SHA1 crypt/encode a plaintext data using
- * base 16 encoding.
+ * base 16 hexadecimal encoding.
  * @param clear The plaintext data.
  * @param len The length of the plaintext data
  * @param out The encrypted/encoded password
  */
-ACR_DECLARE(wchar_t *) ACR_SHA1Base16W(const wchar_t *clear, size_t len,
+ACR_DECLARE(wchar_t *) ACR_SHA1EncodeW(const wchar_t *clear, size_t len,
                                        wchar_t *out);
 
 /**
@@ -167,21 +167,21 @@
 
 /**
  * Provide a means to MD5 crypt/encode a plaintext data using
- * base 16 encoding.
+ * base 16 hexadecimal encoding.
  * @param clear The plaintext data.
  * @param len The length of the plaintext data
  * @param out The encrypted/encoded password
  */
-ACR_DECLARE(char *) ACR_MD5Base16A(const char *clear, size_t len, char *out);
+ACR_DECLARE(char *) ACR_MD5EncodeA(const char *clear, size_t len, char *out);
 
 /**
  * Provide a means to MD5 crypt/encode a plaintext data using
- * base 16 encoding.
+ * base 16 hexadecimal encoding.
  * @param clear The plaintext data.
  * @param len The length of the plaintext data
  * @param out The encrypted/encoded password
  */
-ACR_DECLARE(wchar_t *) ACR_MD5Base16W(const wchar_t *clear, size_t len,
+ACR_DECLARE(wchar_t *) ACR_MD5EncodeW(const wchar_t *clear, size_t len,
                                       wchar_t *out);
 
 

Modified: commons/sandbox/runtime/trunk/src/main/native/os/win32/wutil.c
URL: http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/native/os/win32/wutil.c?rev=803023&r1=803022&r2=803023&view=diff
==============================================================================
--- commons/sandbox/runtime/trunk/src/main/native/os/win32/wutil.c (original)
+++ commons/sandbox/runtime/trunk/src/main/native/os/win32/wutil.c Tue Aug 11 08:15:56 2009
@@ -50,11 +50,9 @@
     wcscat(rname, dtnames[type]);
     rc = GetFullPathNameW(fname, ACR_HBUFF_LEN, pname, NULL);
     if (rc == 0 || rc > ACR_HBUFF_LEN)
-        ACR_SHA1Base16W(fname, wcslen(fname), rname + 10);
+        ACR_SHA1EncodeW(fname, wcslen(fname), rname + 10);
     else
-        ACR_SHA1Base16W(pname, wcslen(pname), rname + 10);
-    fprintf(stdout, "Converted %S from %S\n", rname, pname);
-    fflush(stdout);
+        ACR_SHA1EncodeW(pname, wcslen(pname), rname + 10);
     return rname;
 }
 

Modified: commons/sandbox/runtime/trunk/src/main/native/shared/sha1.c
URL: http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/native/shared/sha1.c?rev=803023&r1=803022&r2=803023&view=diff
==============================================================================
--- commons/sandbox/runtime/trunk/src/main/native/shared/sha1.c (original)
+++ commons/sandbox/runtime/trunk/src/main/native/shared/sha1.c Tue Aug 11 08:15:56 2009
@@ -216,7 +216,7 @@
     }
 }
 
-ACR_DECLARE(char *) ACR_SHA1Base16A(const char *clear, size_t len, char *out)
+ACR_DECLARE(char *) ACR_SHA1EncodeA(const char *clear, size_t len, char *out)
 {
     int i, x = 0;
     acr_sha1_ctx_t context;
@@ -238,7 +238,7 @@
     return out;
 }
 
-ACR_DECLARE(wchar_t *) ACR_SHA1Base16W(const wchar_t *clear, size_t len,
+ACR_DECLARE(wchar_t *) ACR_SHA1EncodeW(const wchar_t *clear, size_t len,
                                        wchar_t *out)
 {
     int i, x = 0;



Mime
View raw message