meta: rename to fx

This commit is contained in:
2026-03-16 10:35:43 +00:00
parent 84df46489a
commit e9d0e323f0
233 changed files with 12875 additions and 12869 deletions

View File

@@ -19,7 +19,7 @@ A million repetitions of "a"
#include "hash.h"
#include <blue/core/hash.h>
#include <fx/core/hash.h>
#include <stdio.h>
#include <string.h>
@@ -187,7 +187,7 @@ void SHA1Transform(uint32_t state[5], const unsigned char buffer[64])
/* sha_init - Initialize new context */
static void sha_init(struct b_hash_ctx *context)
static void sha_init(struct fx_hash_ctx *context)
{
/* SHA1 initialization constants */
context->ctx_state.sha1.state[0] = 0x67452301;
@@ -200,7 +200,7 @@ static void sha_init(struct b_hash_ctx *context)
/* Run your data through this. */
static void sha_update(struct b_hash_ctx *context, const void *p, size_t len)
static void sha_update(struct fx_hash_ctx *context, const void *p, size_t len)
{
const unsigned char *data = p;
uint32_t i, j;
@@ -226,7 +226,7 @@ static void sha_update(struct b_hash_ctx *context, const void *p, size_t len)
/* Add padding and return the message digest. */
static void sha_finish(struct b_hash_ctx *context, void *out, size_t max)
static void sha_finish(struct fx_hash_ctx *context, void *out, size_t max)
{
unsigned i;
@@ -241,7 +241,7 @@ static void sha_finish(struct b_hash_ctx *context, void *out, size_t max)
& 255); /* Endian independent */
}
char digest[B_DIGEST_LENGTH_SHA1];
char digest[FX_DIGEST_LENGTH_SHA1];
c = 0200;
sha_update(context, &c, 1);
while ((context->ctx_state.sha1.count[0] & 504) != 448) {
@@ -255,12 +255,12 @@ static void sha_finish(struct b_hash_ctx *context, void *out, size_t max)
& 255);
}
memcpy(out, digest, b_min(size_t, sizeof digest, max));
memcpy(out, digest, fx_min(size_t, sizeof digest, max));
/* Wipe variables */
memset(&finalcount, '\0', sizeof(finalcount));
}
struct b_hash_function_ops z__b_sha1_ops = {
struct fx_hash_function_ops z__fx_sha1_ops = {
.hash_init = sha_init,
.hash_update = sha_update,
.hash_finish = sha_finish,