summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/bf/blowfish.c
diff options
context:
space:
mode:
authorjoshua <>2024-03-29 02:37:20 +0000
committerjoshua <>2024-03-29 02:37:20 +0000
commitc83adcc807d6ce82a3958d9a4a3f6e09c74fd3f3 (patch)
treec54dc43ec2b1f4168a07a0cd3963ac1de01d3839 /src/lib/libcrypto/bf/blowfish.c
parent6c0c658b98c6d5fb44e00a2922c86d02d7df112f (diff)
downloadopenbsd-c83adcc807d6ce82a3958d9a4a3f6e09c74fd3f3.tar.gz
openbsd-c83adcc807d6ce82a3958d9a4a3f6e09c74fd3f3.tar.bz2
openbsd-c83adcc807d6ce82a3958d9a4a3f6e09c74fd3f3.zip
Hide symbols in Blowfish
ok jsing tb
Diffstat (limited to '')
-rw-r--r--src/lib/libcrypto/bf/blowfish.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/lib/libcrypto/bf/blowfish.c b/src/lib/libcrypto/bf/blowfish.c
index fa6d66fcea..330d7a8e07 100644
--- a/src/lib/libcrypto/bf/blowfish.c
+++ b/src/lib/libcrypto/bf/blowfish.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: blowfish.c,v 1.2 2024/03/27 11:54:29 jsing Exp $ */ 1/* $OpenBSD: blowfish.c,v 1.3 2024/03/29 02:37:20 joshua Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -380,6 +380,7 @@ BF_encrypt(BF_LONG *data, const BF_KEY *key)
380 data[1] = l&0xffffffffL; 380 data[1] = l&0xffffffffL;
381 data[0] = r&0xffffffffL; 381 data[0] = r&0xffffffffL;
382} 382}
383LCRYPTO_ALIAS(BF_encrypt);
383 384
384#ifndef BF_DEFAULT_OPTIONS 385#ifndef BF_DEFAULT_OPTIONS
385 386
@@ -422,6 +423,7 @@ BF_decrypt(BF_LONG *data, const BF_KEY *key)
422 data[1] = l&0xffffffffL; 423 data[1] = l&0xffffffffL;
423 data[0] = r&0xffffffffL; 424 data[0] = r&0xffffffffL;
424} 425}
426LCRYPTO_ALIAS(BF_decrypt);
425 427
426void 428void
427BF_cbc_encrypt(const unsigned char *in, unsigned char *out, long length, 429BF_cbc_encrypt(const unsigned char *in, unsigned char *out, long length,
@@ -498,6 +500,7 @@ BF_cbc_encrypt(const unsigned char *in, unsigned char *out, long length,
498 tin0 = tin1 = tout0 = tout1 = xor0 = xor1 = 0; 500 tin0 = tin1 = tout0 = tout1 = xor0 = xor1 = 0;
499 tin[0] = tin[1] = 0; 501 tin[0] = tin[1] = 0;
500} 502}
503LCRYPTO_ALIAS(BF_cbc_encrypt);
501 504
502/* 505/*
503 * The input and output encrypted as though 64bit cfb mode is being 506 * The input and output encrypted as though 64bit cfb mode is being
@@ -561,6 +564,7 @@ BF_cfb64_encrypt(const unsigned char *in, unsigned char *out, long length,
561 v0 = v1 = ti[0] = ti[1] = t=c = cc = 0; 564 v0 = v1 = ti[0] = ti[1] = t=c = cc = 0;
562 *num = n; 565 *num = n;
563} 566}
567LCRYPTO_ALIAS(BF_cfb64_encrypt);
564 568
565void 569void
566BF_ecb_encrypt(const unsigned char *in, unsigned char *out, 570BF_ecb_encrypt(const unsigned char *in, unsigned char *out,
@@ -582,6 +586,7 @@ BF_ecb_encrypt(const unsigned char *in, unsigned char *out,
582 l2n(l, out); 586 l2n(l, out);
583 l = d[0] = d[1] = 0; 587 l = d[0] = d[1] = 0;
584} 588}
589LCRYPTO_ALIAS(BF_ecb_encrypt);
585 590
586/* 591/*
587 * The input and output encrypted as though 64bit ofb mode is being 592 * The input and output encrypted as though 64bit ofb mode is being
@@ -632,6 +637,7 @@ BF_ofb64_encrypt(const unsigned char *in, unsigned char *out, long length,
632 t = v0 = v1 = ti[0] = ti[1] = 0; 637 t = v0 = v1 = ti[0] = ti[1] = 0;
633 *num = n; 638 *num = n;
634} 639}
640LCRYPTO_ALIAS(BF_ofb64_encrypt);
635 641
636void 642void
637BF_set_key(BF_KEY *key, int len, const unsigned char *data) 643BF_set_key(BF_KEY *key, int len, const unsigned char *data)
@@ -686,4 +692,5 @@ BF_set_key(BF_KEY *key, int len, const unsigned char *data)
686 p[i + 1] = in[1]; 692 p[i + 1] = in[1];
687 } 693 }
688} 694}
695LCRYPTO_ALIAS(BF_set_key);
689#endif 696#endif