Loading...
Searching...
No Matches
apr_md5.h
Go to the documentation of this file.
/*
* This is work is derived from material Copyright RSA Data Security, Inc.
*
* The RSA copyright statement and Licence for that original material is
* included below. This is followed by the Apache copyright statement and
* licence for the modifications made to that material.
*/
/* Copyright (C) 1991-2, RSA Data Security, Inc. Created 1991. All
rights reserved.
License to copy and use this software is granted provided that it
is identified as the "RSA Data Security, Inc. MD5 Message-Digest
Algorithm" in all material mentioning or referencing this software
or this function.
License is also granted to make and use derivative works provided
that such works are identified as "derived from the RSA Data
Security, Inc. MD5 Message-Digest Algorithm" in all material
mentioning or referencing the derived work.
RSA Data Security, Inc. makes no representations concerning either
the merchantability of this software or the suitability of this
software for any particular purpose. It is provided "as is"
without express or implied warranty of any kind.
These notices must be retained in any copies of any part of this
documentation and/or software.
*/
/* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef APR_MD5_H
#define APR_MD5_H
#include "apu.h"
#include "apr_xlate.h"
#ifdef __cplusplus
extern "C" {
#endif
#define APR_MD5_DIGESTSIZE 16
typedef struct apr_md5_ctx_t apr_md5_ctx_t;
struct apr_md5_ctx_t {
apr_uint32_t state[4];
apr_uint32_t count[2];
unsigned char buffer[64];
apr_xlate_t *xlate;
};
APU_DECLARE(apr_status_t) apr_md5_init(apr_md5_ctx_t *context);
APU_DECLARE(apr_status_t) apr_md5_set_xlate(apr_md5_ctx_t *context,
apr_xlate_t *xlate);
APU_DECLARE(apr_status_t) apr_md5_update(apr_md5_ctx_t *context,
const void *input,
apr_size_t inputLen);
APU_DECLARE(apr_status_t) apr_md5_final(unsigned char digest[APR_MD5_DIGESTSIZE],
apr_md5_ctx_t *context);
APU_DECLARE(apr_status_t) apr_md5(unsigned char digest[APR_MD5_DIGESTSIZE],
const void *input,
apr_size_t inputLen);
APU_DECLARE(apr_status_t) apr_md5_encode(const char *password, const char *salt,
char *result, apr_size_t nbytes);
APU_DECLARE(apr_status_t) apr_bcrypt_encode(const char *pw,
unsigned int count,
const unsigned char *salt,
apr_size_t salt_len,
char *out, apr_size_t out_len);
APU_DECLARE(apr_status_t) apr_password_validate(const char *passwd,
const char *hash);
#ifdef __cplusplus
}
#endif
#endif /* !APR_MD5_H */
apr_xlate.h
APR I18N translation library.
APR_MD5_DIGESTSIZE
#define APR_MD5_DIGESTSIZE
Definition apr_md5.h:68
apr_md5_update
apr_status_t apr_md5_update(apr_md5_ctx_t *context, const void *input, apr_size_t inputLen)
apr_md5_final
apr_status_t apr_md5_final(unsigned char digest[APR_MD5_DIGESTSIZE], apr_md5_ctx_t *context)
apr_md5_init
apr_status_t apr_md5_init(apr_md5_ctx_t *context)
apr_bcrypt_encode
apr_status_t apr_bcrypt_encode(const char *pw, unsigned int count, const unsigned char *salt, apr_size_t salt_len, char *out, apr_size_t out_len)
apr_password_validate
apr_status_t apr_password_validate(const char *passwd, const char *hash)
apr_md5
apr_status_t apr_md5(unsigned char digest[APR_MD5_DIGESTSIZE], const void *input, apr_size_t inputLen)
apr_md5_set_xlate
apr_status_t apr_md5_set_xlate(apr_md5_ctx_t *context, apr_xlate_t *xlate)
apr_md5_encode
apr_status_t apr_md5_encode(const char *password, const char *salt, char *result, apr_size_t nbytes)
apr_xlate_t
struct apr_xlate_t apr_xlate_t
Definition apr_xlate.h:39
apr_md5_ctx_t
Definition apr_md5.h:74
apr_md5_ctx_t::count
apr_uint32_t count[2]
Definition apr_md5.h:78
apr_md5_ctx_t::xlate
apr_xlate_t * xlate
Definition apr_md5.h:84
apr_md5_ctx_t::state
apr_uint32_t state[4]
Definition apr_md5.h:76
apr_md5_ctx_t::buffer
unsigned char buffer[64]
Definition apr_md5.h:80