--- /dev/null
+/* $OpenBSD: whrlpool.h,v 1.1 2024/03/30 03:45:47 joshua Exp $ */
+/*
+ * Copyright (c) 2024 Joshua Sing <joshua@joshuasing.dev>
+ *
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#ifndef _LIBCRYPTO_WHRLPOOL_H
+#define _LIBCRYPTO_WHRLPOOL_H
+
+#ifndef _MSC_VER
+#include_next <openssl/whrlpool.h>
+#else
+#include "../include/openssl/whrlpool.h"
+#endif
+#include "crypto_namespace.h"
+
+LCRYPTO_USED(WHIRLPOOL_Init);
+LCRYPTO_USED(WHIRLPOOL_Update);
+LCRYPTO_USED(WHIRLPOOL_BitUpdate);
+LCRYPTO_USED(WHIRLPOOL_Final);
+LCRYPTO_USED(WHIRLPOOL);
+
+#endif /* _LIBCRYPTO_WHRLPOOL_H */
-/* $OpenBSD: whirlpool.c,v 1.1 2024/03/29 02:41:49 jsing Exp $ */
+/* $OpenBSD: whirlpool.c,v 1.2 2024/03/30 03:45:47 joshua Exp $ */
/**
* The Whirlpool hashing function.
*
memset (c, 0, sizeof(*c));
return (1);
}
+LCRYPTO_ALIAS(WHIRLPOOL_Init);
int
WHIRLPOOL_Update(WHIRLPOOL_CTX *c, const void *_inp, size_t bytes)
return (1);
}
+LCRYPTO_ALIAS(WHIRLPOOL_Update);
void
WHIRLPOOL_BitUpdate(WHIRLPOOL_CTX *c, const void *_inp, size_t bits)
}
}
}
+LCRYPTO_ALIAS(WHIRLPOOL_BitUpdate);
int
WHIRLPOOL_Final(unsigned char *md, WHIRLPOOL_CTX *c)
}
return (0);
}
+LCRYPTO_ALIAS(WHIRLPOOL_Final);
unsigned char *
WHIRLPOOL(const void *inp, size_t bytes, unsigned char *md)
WHIRLPOOL_Final(md, &ctx);
return (md);
}
+LCRYPTO_ALIAS(WHIRLPOOL);