streamlined the layout, don't need a package

This commit is contained in:
Joshua Flores 2025-04-26 08:47:35 -04:00
parent 037472fc07
commit 5f28587c15
No known key found for this signature in database
GPG key ID: CE41E342DBBBB9B7
9 changed files with 11 additions and 73 deletions

10
01.py Normal file
View file

@ -0,0 +1,10 @@
import helper, cryptlib
def main():
hex_string = helper.read_file("data/01.txt")
solution = cryptlib.hex_to_base64(hex_string)
print(solution.decode())
if __name__ == '__main__':
main()

View file

@ -1,14 +1,7 @@
#!/usr/bin/env python
import os, sys
module_dir = os.path.relpath('../src/cryptopals')
sys.path.insert(0, module_dir)
import helper, cryptlib
def main():
content = helper.read_file("../data/02.txt")
content = helper.read_file("data/02.txt")
hexstring_list = content.splitlines()
solution = cryptlib.byte_xor(hexstring_list[0], hexstring_list[1])
print(hex(solution)[2:])

View file

@ -1,19 +0,0 @@
[project]
name = "cryptopals"
version = "0.1"
authors = [
{ name="Joshua Flores", email="josh@heavyguys.net"},
]
description = "A place to hold solutions for the Cryptopals Challenges"
readme = "README.md"
requires-python = ">=3.9"
classifiers = [
"Programming Language :: Python :: 3",
"Operating System :: OS Independent",
]
license = "MIT"
license-files = ["LICEN[CS]E"]
[project.urls]
Homepage = "https://git.heavyguys.net/Josh/cryptopals"

View file

@ -1,24 +0,0 @@
[metadata]
name = cryptopals
version = 0.1
author = Joshua Flores
author_email = josh@heavyguys.net
description = Cryptopals Solutions
long_description = file: README.md, LICENSE.txt
long_description_content_type = text/markdown
url = https://git.heavyguys.net/Josh/cryptopals
project_urls =
repository = https://git.heavyguys.net/Josh/cryptopals.git
classifiers =
Programming Language :: Python :: 3
License :: OSI Approved :: MIT License
Operating System :: OS Independent
[options]
package_dir =
= src
packages = find:
python_requires = >=3.9
[options.packages.find]
where = src

View file

@ -1,10 +1,5 @@
#!/usr/bin/env python
import os, sys
module_dir = os.path.relpath('../src/cryptopals')
sys.path.insert(0, module_dir)
import helper, cryptlib
def main():

View file

@ -1,17 +0,0 @@
#!/usr/bin/env python
import os, sys
module_dir = os.path.relpath('../src/cryptopals')
sys.path.insert(0, module_dir)
import helper, cryptlib
def main():
hex_string = helper.read_file("../data/01.txt")
solution = cryptlib.hex_to_base64(hex_string)
print(solution.decode())
if __name__ == '__main__':
main()