# SHA-1 can not be configured

**URL:** <https://forum.codecrafters.io/t/sha-1-can-not-be-configured/3073>\
**Category:** Challenges\
**Tags:** challenge:git\
**Created:** [November 23, 2024, 5:49am UTC](https://forum.codecrafters.io/t/sha-1-can-not-be-configured/3073 "2024-11-23T05:49:14Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rkgarg2127](https://yyz1.discourse-cdn.com/flex003/user_avatar/forum.codecrafters.io/rkgarg2127/32/3069_2.png) [@Rkgarg2127](https://forum.codecrafters.io/u/Rkgarg2127)\
**Post date:** [November 23, 2024, 5:49am UTC](https://forum.codecrafters.io/t/sha-1-can-not-be-configured/3073/1 "2024-11-23T05:49:14Z")

</div>

here is link of my repo:- [GitHub - Rkgarg2127/git\_cpp](https://github.com/Rkgarg2127/git_cpp)

[compile] /usr/bin/ld: CMakeFiles/git.dir/src/Server.cpp.o: in function `sha_file(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)': [compile] Server.cpp:(.text+0x112e): undefined reference to `SHA1’  
[compile] collect2: error: ld returned 1 exit status  
[compile] gmake[2]: \*\*\* [CMakeFiles/git.dir/build.make:97: git] Error 1  
[compile] gmake[1]: \*\*\* [CMakeFiles/Makefile2:83: CMakeFiles/git.dir/all] Error 2  
[compile] gmake: \*\*\* [Makefile:91: all] Error 2

---

<div class="post-metadata">

**Author:** ![andy1li](https://yyz1.discourse-cdn.com/flex003/user_avatar/forum.codecrafters.io/andy1li/32/10_2.png) [@andy1li](https://forum.codecrafters.io/u/andy1li)\
**Post date:** [November 23, 2024, 6:15am UTC](https://forum.codecrafters.io/t/sha-1-can-not-be-configured/3073/2 "2024-11-23T06:15:36Z")

</div>

Hi @Rkgarg2127, sorry if I missed it, but have you implemented the SHA1 function?

---

<div class="post-metadata">

**Author:** ![Rkgarg2127](https://yyz1.discourse-cdn.com/flex003/user_avatar/forum.codecrafters.io/rkgarg2127/32/3069_2.png) [@Rkgarg2127](https://forum.codecrafters.io/u/Rkgarg2127)\
**Post date:** [November 23, 2024, 6:34am UTC](https://forum.codecrafters.io/t/sha-1-can-not-be-configured/3073/3 "2024-11-23T06:34:28Z")

</div>

SHA1((unsigned char \*)data.c\_str(), data.size(), hash);  
I have done this line 167 of server.cpp

---

<div class="post-metadata">

**Author:** ![andy1li](https://yyz1.discourse-cdn.com/flex003/user_avatar/forum.codecrafters.io/andy1li/32/10_2.png) [@andy1li](https://forum.codecrafters.io/u/andy1li)\
**Post date:** [November 23, 2024, 7:15am UTC](https://forum.codecrafters.io/t/sha-1-can-not-be-configured/3073/4 "2024-11-23T07:15:40Z")

</div>

My C++ is a bit rusty, but it seems like you’re only **calling** SHA1, and it doesn’t appear to be **implemented** within the codebase?

---

<div class="post-metadata">

**Author:** ![Rkgarg2127](https://yyz1.discourse-cdn.com/flex003/user_avatar/forum.codecrafters.io/rkgarg2127/32/3069_2.png) [@Rkgarg2127](https://forum.codecrafters.io/u/Rkgarg2127)\
**Post date:** [November 23, 2024, 7:18am UTC](https://forum.codecrafters.io/t/sha-1-can-not-be-configured/3073/5 "2024-11-23T07:18:16Z")

</div>

so what can be done how to implement it??  
I have searched online and it is generally used this way.

---

<div class="post-metadata">

**Author:** ![andy1li](https://yyz1.discourse-cdn.com/flex003/user_avatar/forum.codecrafters.io/andy1li/32/10_2.png) [@andy1li](https://forum.codecrafters.io/u/andy1li)\
**Post date:** [December 28, 2024, 12:29am UTC](https://forum.codecrafters.io/t/sha-1-can-not-be-configured/3073/6 "2024-12-28T00:29:44Z")

</div>

Closing this thread due to inactivity. If you still need assistance, feel free to reopen or start a new discussion!

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex003/uploads/codecrafters/original/3X/7/0/700657133935c15703e22c7c8870394f6e6dc27d.svg) [@system](https://forum.codecrafters.io/u/system)\
**Post date:** [January 2, 2025, 12:30am UTC](https://forum.codecrafters.io/t/sha-1-can-not-be-configured/3073/7 "2025-01-02T00:30:07Z")

</div>

Closed on January 2, 2025, 12:30am UTC

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.
