Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
G
git-commit-hash-vanitygen
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Recolic
git-commit-hash-vanitygen
Commits
fa25991f
There was an error fetching the commit references. Please try again later.
Commit
fa25991f
authored
3 years ago
by
Recolic K
Browse files
Options
Downloads
Patches
Plain Diff
Update doc G"
parent
c48b5115
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
.gitignore
+3
-0
3 additions, 0 deletions
.gitignore
git-commit-hash-vanity.cc
+5
-4
5 additions, 4 deletions
git-commit-hash-vanity.cc
with
8 additions
and
4 deletions
.gitignore
0 → 100644
+
3
−
0
View file @
fa25991f
git-commit-hash-vanity
sha1-benchmark
This diff is collapsed.
Click to expand it.
git-commit-hash-vanity.cc
+
5
−
4
View file @
fa25991f
...
@@ -74,8 +74,9 @@ void crack_thread(const std::string catfile_fmt, long timestamp_begin, long time
...
@@ -74,8 +74,9 @@ void crack_thread(const std::string catfile_fmt, long timestamp_begin, long time
// TODO: add more requirement for check-hash
// TODO: add more requirement for check-hash
auto
outputbuf
=
new
std
::
string
(
commit_msg
.
size
()
+
128
,
0
);
auto
outputbuf
=
new
std
::
string
(
commit_msg
.
size
()
+
128
,
0
);
std
::
sprintf
(
outputbuf
->
data
(),
commit_msg
.
c_str
(),
payload_msg_buf
.
data
());
std
::
sprintf
(
outputbuf
->
data
(),
commit_msg
.
c_str
(),
payload_msg_buf
.
data
());
std
::
printf
(
"Found answer: git commit -m '%s' --date '%ld +0800', hash:
\n
"
,
outputbuf
->
data
(),
payload_ts_count
);
std
::
printf
(
"Found answer:
GIT_COMMITTER_DATE='%ld +0800'
git commit -m '%s' --date '%ld +0800', hash:
\n
"
,
payload_ts_count
,
outputbuf
->
data
(),
payload_ts_count
);
dump
(
hashbuf
,
20
);
dump
(
hashbuf
,
20
);
// TODO: debug msg to show hashed databuf
exit
(
0
);
exit
(
0
);
}
}
}
}
...
@@ -86,10 +87,10 @@ void crack_thread(const std::string catfile_fmt, long timestamp_begin, long time
...
@@ -86,10 +87,10 @@ void crack_thread(const std::string catfile_fmt, long timestamp_begin, long time
}
}
int
main
()
{
int
main
()
{
auto
commit_msg
=
"
Bug fix
%s"
;
auto
commit_msg
=
"
Update doc
%s"
;
auto
catfile_text
=
auto
catfile_text
=
R"TXT(tree
bd79de44c0e12c9b0969dae3ea31b520aad09f75
R"TXT(tree
02b900fadfdd40d74c23a3f7fd943e4fb15fdca9
parent
d9074a1cb3c8fee13c7563ba4be0fc1e9fec6a79
parent
f8a6d039e7647ff54e6cf5a2d109ddf5c041ea86
author Recolic K <bensl@microsoft.com> %ld +0800
author Recolic K <bensl@microsoft.com> %ld +0800
committer Recolic K <bensl@microsoft.com> %ld +0800
committer Recolic K <bensl@microsoft.com> %ld +0800
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment