/usr/src/redhat/BUILD/httpd-2.2.3/srclib/apr-util/include/apr_sha1.h

APR-UTIL SHA1 library [詳細]

#include "apu.h"
#include "apr_general.h"

ソースコードを見る。

データ構造

struct  apr_sha1_ctx_t

マクロ定義

#define APR_SHA1_DIGESTSIZE   20
#define APR_SHA1PW_ID   "{SHA}"
#define APR_SHA1PW_IDLEN   5

型定義

typedef apr_sha1_ctx_t apr_sha1_ctx_t

関数

void apr_sha1_base64 (const char *clear, int len, char *out)
void apr_sha1_init (apr_sha1_ctx_t *context)
void apr_sha1_update (apr_sha1_ctx_t *context, const char *input, unsigned int inputLen)
void apr_sha1_update_binary (apr_sha1_ctx_t *context, const unsigned char *input, unsigned int inputLen)
void apr_sha1_final (unsigned char digest[APR_SHA1_DIGESTSIZE], apr_sha1_ctx_t *context)


説明

APR-UTIL SHA1 library


マクロ定義

#define APR_SHA1_DIGESTSIZE   20

size of the SHA1 DIGEST

#define APR_SHA1PW_ID   "{SHA}"

Define the Magic String prefix that identifies a password as being hashed using our algorithm.

#define APR_SHA1PW_IDLEN   5

length of the SHA Password


型定義

typedef struct apr_sha1_ctx_t apr_sha1_ctx_t

参照:
apr_sha1_ctx_t


関数

void apr_sha1_base64 ( const char *  clear,
int  len,
char *  out 
)

Provide a means to SHA1 crypt/encode a plaintext password in a way which makes password file compatible with those commonly use in netscape web and ldap installations.

引数:
clear The plaintext password
len The length of the plaintext password
out The encrypted/encoded password
覚え書き:
SHA1 support is useful for migration purposes, but is less secure than Apache's password format, since Apache's (MD5) password format uses a random eight character salt to generate one of many possible hashes for the same password. Netscape uses plain SHA1 without a salt, so the same password will always generate the same hash, making it easier to break since the search space is smaller.

void apr_sha1_final ( unsigned char  digest[APR_SHA1_DIGESTSIZE],
apr_sha1_ctx_t context 
)

Finish computing the SHA digest

引数:
digest the output buffer in which to store the digest
context The context to finalize

void apr_sha1_init ( apr_sha1_ctx_t context  ) 

Initialize the SHA digest

引数:
context The SHA context to initialize

void apr_sha1_update ( apr_sha1_ctx_t context,
const char *  input,
unsigned int  inputLen 
)

Update the SHA digest

引数:
context The SHA1 context to update
input The buffer to add to the SHA digest
inputLen The length of the input buffer

void apr_sha1_update_binary ( apr_sha1_ctx_t context,
const unsigned char *  input,
unsigned int  inputLen 
)

Update the SHA digest with binary data

引数:
context The SHA1 context to update
input The buffer to add to the SHA digest
inputLen The length of the input buffer


Apacheに対してSun Jul 19 22:05:27 2009に生成されました。  doxygen 1.4.7