修改License

This commit is contained in:
Simon
2022-08-25 22:42:11 -07:00
parent 16b39da60b
commit 0b4308b948
268 changed files with 67247 additions and 67015 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2022 The GmSSL Project. All Rights Reserved.
* Copyright 2014-2022 The GmSSL Project. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the License); you may
* not use this file except in compliance with the License.
@@ -7,42 +7,43 @@
* http://www.apache.org/licenses/LICENSE-2.0
*/
#ifndef GMSSL_MD5_H
#define GMSSL_MD5_H
#include <string.h>
#include <stdint.h>
#ifdef __cplusplus
extern "C" {
#endif
#define MD5_IS_BIG_ENDIAN 0
#define MD5_DIGEST_SIZE 16
#define MD5_BLOCK_SIZE 64
#define MD5_STATE_WORDS (MD5_BLOCK_SIZE/sizeof(uint32_t))
typedef struct {
uint32_t state[MD5_STATE_WORDS];
uint64_t nblocks;
uint8_t block[MD5_BLOCK_SIZE];
size_t num;
} MD5_CTX;
void md5_init(MD5_CTX *ctx);
void md5_update(MD5_CTX *ctx, const uint8_t *data, size_t datalen);
void md5_finish(MD5_CTX *ctx, uint8_t dgst[MD5_DIGEST_SIZE]);
void md5_digest(const uint8_t *data, size_t datalen, uint8_t dgst[MD5_DIGEST_SIZE]);
#ifdef __cplusplus
}
#endif
#endif
#ifndef GMSSL_MD5_H
#define GMSSL_MD5_H
#include <string.h>
#include <stdint.h>
#ifdef __cplusplus
extern "C" {
#endif
#define MD5_IS_BIG_ENDIAN 0
#define MD5_DIGEST_SIZE 16
#define MD5_BLOCK_SIZE 64
#define MD5_STATE_WORDS (MD5_BLOCK_SIZE/sizeof(uint32_t))
typedef struct {
uint32_t state[MD5_STATE_WORDS];
uint64_t nblocks;
uint8_t block[MD5_BLOCK_SIZE];
size_t num;
} MD5_CTX;
void md5_init(MD5_CTX *ctx);
void md5_update(MD5_CTX *ctx, const uint8_t *data, size_t datalen);
void md5_finish(MD5_CTX *ctx, uint8_t dgst[MD5_DIGEST_SIZE]);
void md5_digest(const uint8_t *data, size_t datalen, uint8_t dgst[MD5_DIGEST_SIZE]);
#ifdef __cplusplus
}
#endif
#endif