Skip to content

Commit 96537eb

Browse files
[UPDATE] Minor cleanup
* Fixed macros * Refactored code to use macros * added consistant 0-BSD headers * SHA-2 Royalty-Free Patent Notice file just-in-case * corrected CC-by-line from implementation author to patent holder (Clearification: Author's Code still 0BSD but some parts probably subject to the royalty-free U.S. Patent 6,829,355) * added some coments to code
1 parent e66d231 commit 96537eb

8 files changed

Lines changed: 251 additions & 28 deletions

File tree

.PATENT-NOTE-6829355

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
The U.S. Government holds U.S. Patent 6,829,355 on the "Device for and method
2+
of
3+
one-way cryptographic hashing", which has been incorporated into Federal
4+
Information Processing Standard (FIPS) 180-2. This patent was issued on
5+
December 7, 2004. The National Security Agency has made U.S. Patent 6,829,355
6+
available royalty-free.

FeatherHash/sha2.c

Lines changed: 29 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,19 @@
11
/* CC0 1.0 Universal - sha2.c
2+
3+
Permission to use, copy, modify, and/or distribute this software for any
4+
purpose with or without fee is hereby granted.
5+
6+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
7+
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
8+
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
9+
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
10+
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
11+
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
12+
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
13+
214
Minimal SHA-256 and SHA-512 implementations per FIPS 180-4.
3-
No dynamic allocation. Portable C (C11/C14/C23). */
15+
No dynamic allocation. Portable C (C11/C14/C23).
16+
*/
417
#include "sha2.h"
518

619
#if defined(__has_include)
@@ -20,11 +33,21 @@
2033
#endif /* !defined(__has_include) */
2134

2235
/* --- Utility macros --- */
23-
static inline uint32_t rotr32(uint32_t x, unsigned n) {
36+
37+
uint32_t rotr32(uint32_t x, unsigned n) {
38+
#if defined(__clang__) && __clang__ && __has_builtin(__builtin_rotateright32)
39+
return __builtin_rotateright32(x, n);
40+
#else
2441
return (x >> n) | (x << (32 - n));
42+
#endif
2543
}
26-
static inline uint64_t rotr64(uint64_t x, unsigned n) {
44+
45+
uint64_t rotr64(uint64_t x, unsigned n) {
46+
#if defined(__clang__) && __clang__ && __has_builtin(__builtin_rotateright64)
47+
return __builtin_rotateright64(x, n);
48+
#else
2749
return (x >> n) | (x << (64 - n));
50+
#endif
2851
}
2952

3053
/* --- SHA-256 implementation --- */
@@ -61,19 +84,13 @@ static void sha256_transform(uint32_t state[8], const uint8_t block[64]) {
6184
((uint32_t)block[t*4 + 3]);
6285
}
6386
for (int t = 16; t < 64; ++t) {
64-
uint32_t s0 = rotr32(w[t-15], 7) ^ rotr32(w[t-15], 18) ^ (w[t-15] >> 3);
65-
uint32_t s1 = rotr32(w[t-2], 17) ^ rotr32(w[t-2], 19) ^ (w[t-2] >> 10);
66-
w[t] = w[t-16] + s0 + w[t-7] + s1;
87+
w[t] = w[t-16] + SIG0(w[t-15]) + w[t-7] + SIG1(w[t-2]);
6788
}
6889
uint32_t a = state[0], b = state[1], c = state[2], d = state[3];
6990
uint32_t e = state[4], f = state[5], g = state[6], h = state[7];
7091
for (int t = 0; t < 64; ++t) {
71-
uint32_t S1 = rotr32(e, 6) ^ rotr32(e, 11) ^ rotr32(e, 25);
72-
uint32_t ch = (e & f) ^ ((~e) & g);
73-
uint32_t temp1 = h + S1 + ch + K256[t] + w[t];
74-
uint32_t S0 = rotr32(a, 2) ^ rotr32(a, 13) ^ rotr32(a, 22);
75-
uint32_t maj = (a & b) ^ (a & c) ^ (b & c);
76-
uint32_t temp2 = S0 + maj;
92+
uint32_t temp1 = h + EP1(e) + CH(e,f,g) + K256[t] + w[t];
93+
uint32_t temp2 = EP0(a) + MAJ(a, b, c);
7794
h = g; g = f; f = e; e = d + temp1;
7895
d = c; c = b; b = a; a = temp1 + temp2;
7996
}

FeatherHash/sha2.h

Lines changed: 177 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,52 @@
11
/* CC0 1.0 Universal - sha2.h
2-
Public domain / CC0. Minimal SHA-2 declarations for sha256/sha384/sha512.
3-
*/
2+
3+
Permission to use, copy, modify, and/or distribute this software for any
4+
purpose with or without fee is hereby granted.
5+
6+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
7+
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
8+
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
9+
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
10+
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
11+
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
12+
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
13+
14+
Minimal SHA-2 declarations for sha256/sha384/sha512.
15+
*/
416
#ifndef FEATHERHASH_SHA2_H
17+
18+
/*!
19+
@header sha2.h
20+
@discussion
21+
Lightweight, portable SHA-256 implementation (API only). This component provides three primary functions:
22+
- sha256_init: initialize a context
23+
- sha256_update: feed bytes into the running hash
24+
- sha256_final: finalize and produce the 32-byte digest
25+
26+
The implementation is intentionally compact and suitable for embedded or utility code. It does not allocate dynamic memory and assumes a little- or big-endian-independent byte-level input (the algorithm itself works with big-endian message words).
27+
28+
The API operates on a caller-allocated sha256_ctx structure, defined as: ``sha256_ctx``.
29+
30+
Thread safety:
31+
- Each sha256_ctx instance may be used by one thread at a time. The functions do not use global mutable state.
32+
33+
Security notes:
34+
- The implementation zeroes the context in sha256_final to reduce lifetime of sensitive intermediate state.
35+
- The implementation is not hardened against side-channel attacks (timing, cache). Do not use for high-security requirements without appropriate hardening.
36+
37+
Usage example:
38+
@code
39+
sha256_ctx ctx;
40+
uint8_t digest[32];
41+
const uint8_t *data = ...;
42+
size_t len = ...;
43+
44+
sha256_init(&ctx);
45+
sha256_update(&ctx, data, len);
46+
sha256_final(&ctx, digest);
47+
@endcode
48+
*/
49+
550
#if defined(__clang__) && __clang__
651
#pragma mark -
752
#pragma mark sha2Header
@@ -51,24 +96,109 @@
5196
extern "C" {
5297
#endif /* !defined(__cplusplus) */
5398

99+
#if defined(__clang__) && __clang__
100+
#pragma mark -
101+
#pragma mark Utility Functions
102+
#endif /* !__clang__ */
103+
104+
/**!
105+
Rotate-32 operation utility.
106+
107+
- Discussion: This version is an intuitive bitwise OR of right shifted bits and the left shifted 'overflow' bits (e.g., "carried over" if you will).
108+
There are certainly better versions out there than this lightweight implementation, but this version is intended for stage0 toolchains
109+
after all.
110+
111+
- Parameter x: The ``uint32_t`` value to rotate right (32 bits).
112+
- Parameter n: The ``unsigned`` distance to rotate right by.
113+
- seealso: A more [general form](https://stackoverflow.com/a/776523) (that one is CC-BY-SA-4.0)
114+
- seealso: The two academic implementation of identical form (a cool coincidence)
115+
* By John Regehr (Publicly available academic implementation; unknown copyright)
116+
on [his blog](https://blog.regehr.org/archives/1063)
117+
* And by Brad Conte (public domain implementation)
118+
on [his github](https://github.com/B-Con/crypto-algorithms/blob/cfbde48414baacf51fc7c74f275190881f037d32/sha256.c#L22)
119+
- seealso: ``rotr64``
120+
- seealso: clang's built-in [builtin_rotateright32](https://clang.llvm.org/docs/LanguageExtensions.html#builtin-rotateright)
121+
*/
122+
static inline uint32_t rotr32(uint32_t x, unsigned n);
123+
124+
/**!
125+
Rotate-64 operation utility.
126+
127+
- Discussion: This version is an intuitive bitwise OR of right shifted bits and the left shifted 'overflow' bits (e.g., "carried over" if you will).
128+
There are certainly better versions out there than this lightweight implementation, but this version is intended for stage0 toolchains
129+
after all.
130+
131+
- Parameter x: The ``uint64_t`` value to rotate right (64 bits).
132+
- Parameter n: The ``unsigned`` distance to rotate right by.
133+
- seealso: A more [general form](https://stackoverflow.com/a/776523) (that one is CC-BY-SA-4.0)
134+
- seealso: ``rotr32``
135+
- seealso: clang's built-in [builtin_rotateright32](https://clang.llvm.org/docs/LanguageExtensions.html#builtin-rotateright)
136+
*/
137+
static inline uint64_t rotr64(uint64_t x, unsigned n);
138+
139+
#if defined(__clang__) && __clang__
140+
#pragma mark -
141+
#pragma mark Secure Hash Algorithm Functions
142+
#endif /* !__clang__ */
143+
54144
/* Context sizes:
55145
- SHA-256: block 64, state 8 x uint32_t
56146
- SHA-512/384: block 128, state 8 x uint64_t
57147
*/
58148

59149
/* SHA-256 */
60150
struct _sha256_ctx {
61-
uint32_t state[8];
62-
uint64_t bitlen;
63-
uint8_t buf[64];
64-
size_t buflen;
151+
uint32_t state[8]; /* internal state (A..H) */
152+
uint64_t bitlen; /* total number of message bits processed */
153+
uint8_t buf[64]; /* partial-block buffer */
154+
size_t buflen; /* number of bytes currently in buf */
65155
};
66156
typedef struct _sha256_ctx sha256_ctx;
67157

158+
/*!
159+
Initialize a ``sha256_ctx`` to begin hashing a new message.
160+
161+
The function sets initial state, zeroes counters and buffer length. Must be
162+
called before ``sha256_update`` / ``sha256_final``.
163+
164+
- Parameter c: Pointer to caller-allocated ``sha256_ctx``.
165+
*/
68166
void sha256_init(sha256_ctx *c);
167+
168+
/*!
169+
Process input bytes into the running SHA-256 computation.
170+
171+
This function may be called multiple times to process streaming data.
172+
- The function updates the context's internal bit length and buffers partial blocks.
173+
- When a full 64-byte block is accumulated, it is processed immediately.
174+
- The caller remains responsible for supplying all message bytes; call ``sha256_final`` to produce the digest.
175+
176+
- Parameter c: Pointer to an initialized ``sha256_ctx``.
177+
- Parameter data: Pointer to input bytes; may be ``NULL`` only when `len` is 0.
178+
- Parameter len: The ``size_t`` of bytes to process.
179+
*/
69180
void sha256_update(sha256_ctx *c, const void *data, size_t len);
181+
182+
/*!
183+
Finalize hashing and write the 32-byte (256-bit) digest in big-endian order to out.
184+
185+
After this call, the context is zeroed and must be re-initialized with ``sha256_init`` before reuse.
186+
187+
- Parameter c: Pointer to a ``sha256_ctx`` previously passed to ``sha256_init`` and ``sha256_update``.
188+
- Parameter out: Pointer to a 32-byte buffer (e.g., `uint8_t[32]`) that will receive the digest.
189+
*/
70190
void sha256_final(sha256_ctx *c, uint8_t out[32]);
71191

192+
/* --- Internal notes (for maintainers) ---
193+
- K256: round constants per FIPS-180-4.
194+
- sha256_transform: processes a single 512-bit block and updates 'state'.
195+
- The message schedule w[0..63] is computed in-place; SIG0/SIG1/EP0/EP1/CH/MAJ are provided as macros.
196+
- Endianness: input bytes are combined to big-endian 32-bit words in sha256_transform.
197+
- The implementation appends the 64-bit message length in big-endian as required by the spec.
198+
- Zeroing the sha256_ctx in sha256_final includes state, counters and buffer to limit exposure of intermediate values.
199+
- Keep the transform function static/internal to prevent inadvertent external use.
200+
*/
201+
72202
/* SHA-512 core (used for SHA-512 and SHA-384) */
73203
typedef struct {
74204
uint64_t state[8];
@@ -86,24 +216,56 @@ void sha512_final(sha512_ctx *c, uint8_t out[64]);
86216
}
87217
#endif /* !defined(__cplusplus) */
88218

89-
#endif /* FEATHERHASH_SHA2_H */
219+
/* --- SHA-256 helper macros --- */
220+
#ifndef FEATHERHASH_SHA2_MACROS
90221

222+
#if defined(__clang__) && __clang__
223+
#pragma mark -
224+
#pragma mark SHA2 Macros
225+
#endif /* !__clang__ */
91226

92227
#if defined(HAS_TYPEOF) && HAS_TYPEOF
93-
#define ROTLEFT(a, b) ({ __typeof__(a) __temp_a = (a); __typeof__(b) __temp_b = (b); ((__temp_a << __temp_b) | (__temp_a >> ((sizeof(__temp_a) * 8) - __temp_b))); })
94-
#define ROTRIGHT(a, b) ({ __typeof__(a) __temp_a = (a); __typeof__(b) __temp_b = (b); ((__temp_a >> __temp_b) | (__temp_a << ((sizeof(__temp_a) * 8) - __temp_b))); })
228+
// ROT32 left and right helper macros
229+
#define ROTLEFT(a, b) ({ __typeof__(a) __temp_a = (a); __typeof__(b) __temp_b = (b); (__typeof__(a))(rotl32(__temp_a, __temp_b)); })
230+
#define ROTRIGHT(a, b) ({ __typeof__(a) __temp_a = (a); __typeof__(b) __temp_b = (b); (__typeof__(a))(rotr32(__temp_a, __temp_b)); })
95231

232+
// W to SIG?() with x,y,z helper macros
233+
#define WTSIG(w, x, y, z) ({ __typeof__(w) __temp_w = (w); __typeof__(x) __temp_x = (x); __typeof__(y) __temp_y = (y); __typeof__(z) __temp_z = (z); (__typeof__(w))((ROTRIGHT(__temp_w, __temp_x) ^ ROTRIGHT(__temp_w, __temp_y)) ^ (__temp_w >> __temp_z)); })
234+
// W to EP?() with x,y,z helper macros
235+
#define WTEP(w, x, y, z) ({ __typeof__(w) __temp_w = (w); __typeof__(x) __temp_x = (x); __typeof__(y) __temp_y = (y); __typeof__(z) __temp_z = (z); (__typeof__(w))((ROTRIGHT(__temp_w, __temp_x) ^ ROTRIGHT(__temp_w, __temp_y)) ^ ROTRIGHT(__temp_w, __temp_z)); })
236+
// SHA-2 EPx functions
237+
#define EP0(n) ({ __typeof__(n) __temp_n = (n); (__typeof__(n))(WTEP(__temp_n, 2, 13, 22)); })
238+
#define EP1(n) ({ __typeof__(n) __temp_n = (n); (__typeof__(n))(WTEP(__temp_n, 6, 11, 25)); })
239+
// SHA-2 SIGx functions
240+
#define SIG0(n) ({ __typeof__(n) __temp_n = (n); (__typeof__(n))(WTSIG(__temp_n, 7, 18, 3)); })
241+
#define SIG1(n) ({ __typeof__(n) __temp_n = (n); (__typeof__(n))(WTSIG(__temp_n, 17, 19, 10)); })
242+
// SHA-2 CH function
96243
#define CH(x, y, z) ({ __typeof__(x) __temp_x = (x); __typeof__(y) __temp_y = (y); __typeof__(z) __temp_z = (z); ((__temp_x & __temp_y) ^ (~__temp_x & __temp_z)); })
244+
// SHA-2 MAJ function
97245
#define MAJ(x, y, z) ({ __typeof__(x) __temp_x = (x); __typeof__(y) __temp_y = (y); __typeof__(z) __temp_z = (z); ((__temp_x & __temp_y) ^ (__temp_x & __temp_z) ^ (__temp_y & __temp_z)); })
98246
#else /* !HAS_TYPEOF */
99247
// Fallback implementation without __typeof__
100-
#define ROTLEFT(a,b) (((a) << (b)) | ((a) >> ((32)-(b))))
101-
#define ROTRIGHT(a,b) (((a) >> (b)) | ((a) << ((32)-(b))))
248+
#define ROTLEFT(a, b) (rotl32((a), (b)))
249+
#define ROTRIGHT(a, b) (rotr32((a), (b)))
250+
251+
// W to SIG?() with x,y,z helper macro
252+
#define WTSIG(w, x, y, z) ((ROTRIGHT((w), (x)) ^ ROTRIGHT((w), (y))) ^ ((w) >> (z)))
253+
// W to EP?() with x,y,z helper macros
254+
#define WTEP(w, x, y, z) ((ROTRIGHT((w), (x)) ^ ROTRIGHT((w), (y))) ^ ROTRIGHT((w), (z)))
255+
// SHA-2 EPx functions
256+
#define EP0(n) (WTEP(n,7,18,3))
257+
#define EP1(n) (WTEP(n,17,19,10))
258+
// SHA-2 SIGx functions
259+
#define SIG0(n) (WTSIG(n,7,18,3))
260+
#define SIG1(n) (WTSIG(n,17,19,10))
261+
// SHA-2 CH function
102262
#define CH(x, y, z) (((x) & (y)) ^ (~(x) & (z)))
263+
// SHA-2 MAJ function
103264
#define MAJ(x, y, z) (((x) & (y)) ^ ((x) & (z)) ^ ((y) & (z)))
104265
#endif /* !defined(HAS_TYPEOF) */
105266

106-
#define EP0(x) (ROTRIGHT(x,2) ^ ROTRIGHT(x,13) ^ ROTRIGHT(x,22))
107-
#define EP1(x) (ROTRIGHT(x,6) ^ ROTRIGHT(x,11) ^ ROTRIGHT(x,25))
108-
#define SIG0(x) (ROTRIGHT(x,7) ^ ROTRIGHT(x,18) ^ ((x) >> 3))
109-
#define SIG1(x) (ROTRIGHT(x,17) ^ ROTRIGHT(x,19) ^ ((x) >> 10))
267+
#define FEATHERHASH_SHA2_MACROS ""
268+
269+
#endif /* FEATHERHASH_SHA2_MACROS */
270+
271+
#endif /* FEATHERHASH_SHA2_H */

FeatherHash/sha256sum.c

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,16 @@
11
/* CC0 1.0 Universal - sha256sum.c
2+
3+
Permission to use, copy, modify, and/or distribute this software for any
4+
purpose with or without fee is hereby granted.
5+
6+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
7+
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
8+
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
9+
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
10+
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
11+
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
12+
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
13+
214
Minimal sha256sum command-line utility. */
315
#include "sha2.h"
416
#include "feather.h"

FeatherHash/sha384sum.c

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,16 @@
11
/* CC0 1.0 Universal - sha384sum.c
2+
3+
Permission to use, copy, modify, and/or distribute this software for any
4+
purpose with or without fee is hereby granted.
5+
6+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
7+
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
8+
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
9+
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
10+
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
11+
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
12+
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
13+
214
Minimal sha384sum command-line utility. Implements SHA-384 by using SHA-512 core
315
with SHA-384 initial IV and truncating output to 48 bytes. */
416
#include "sha2.h"

FeatherHash/sha512sum.c

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,16 @@
11
/* CC0 1.0 Universal - sha512sum.c
2+
3+
Permission to use, copy, modify, and/or distribute this software for any
4+
purpose with or without fee is hereby granted.
5+
6+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
7+
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
8+
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
9+
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
10+
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
11+
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
12+
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
13+
214
Minimal sha512sum command-line utility. */
315
#include "sha2.h"
416
#include "feather.h"

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright (C) 2025 by Mr. Walls
1+
Copyright (C) 2004 by "The United States of America as represented by the National Security Agency" <wtnewbi@tycho.ncsc.mil>
22

33
Permission to use, copy, modify, and/or distribute this software for any
44
purpose with or without fee is hereby granted.

dockerfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ RUN apk update && \
3333
COPY build-featherHash.sh /FeatherHash/build-featherHash.sh
3434
COPY FeatherHash/* /FeatherHash/FeatherHash/
3535
COPY LICENSE /FeatherHash/LICENSE
36+
COPY LICENSE /FeatherHash/.PATENT-NOTE-6829355
3637

3738
# Set the working directory inside the container
3839
WORKDIR /FeatherHash
@@ -70,5 +71,6 @@ LABEL org.opencontainers.image.licenses="0BSD"
7071

7172
COPY --from=featherhash-bellows /FeatherHash/out/bin /bin
7273
COPY --from=featherhash-bellows /FeatherHash/LICENSE /LICENSE
74+
COPY --from=featherhash-bellows /FeatherHash/.PATENT-NOTE-6829355 /.PATENT-NOTE-6829355
7375

7476
ENTRYPOINT ["/bin/sha256sum"]

0 commit comments

Comments
 (0)