Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
50 commits
Select commit Hold shift + click to select a range
d8a115f
Working on documentation
poing Mar 9, 2024
b101a51
Working on documentation
poing Mar 9, 2024
23d2a6e
Working on documentation
poing Mar 9, 2024
4fdd460
Working on documentation
poing Mar 10, 2024
9a9ca5f
Working on documentation
poing Mar 10, 2024
6fb4a67
Working on documentation
poing Mar 10, 2024
d64e1fd
Working on documentation
poing Mar 10, 2024
8100f5a
Working on documentation
poing Mar 10, 2024
30a745b
Working on documentation
poing Mar 10, 2024
18cb0b0
Working on documentation
poing Mar 10, 2024
f4c2f85
Working on documentation
poing Mar 10, 2024
6599609
Working on documentation
poing Mar 10, 2024
9e3d48d
Working on documentation
poing Mar 10, 2024
57c08b2
Working on documentation
poing Mar 10, 2024
5eca1e7
Working on documentation
poing Mar 10, 2024
4fb9f2f
Working on documentation
poing Mar 10, 2024
366c514
Working on documentation
poing Mar 10, 2024
a2c5c62
Working on documentation
poing Mar 10, 2024
9c08afc
Working on documentation
poing Mar 10, 2024
8f21982
Working on documentation
poing Mar 10, 2024
18e8ced
Documentation and implimented SecretsSpec.js tests in Python
poing Mar 12, 2024
5640ea4
Adjust test_with_UTF8 for test_win failure
poing Mar 12, 2024
e82ec47
Adjust test_with_UTF8 for test_win failure
poing Mar 12, 2024
8139817
Adjust test_with_UTF8 for test_win failure
poing Mar 12, 2024
be94f20
Adjust test_with_UTF8 for test_win failure
poing Mar 12, 2024
db16c1d
Adjust test_with_UTF8 for test_win failure
poing Mar 12, 2024
684ccb6
Adjust test_with_UTF8 for test_win failure
poing Mar 12, 2024
72660d8
Implimented SecretsPrivateSpec.js tests in Python
poing Mar 12, 2024
5cd6cec
Adjust test_with_UTF8 for test_win failure
poing Mar 12, 2024
aa066ff
Adjust test_with_UTF8 for test_win failure
poing Mar 12, 2024
d16e14c
Adjust test_with_UTF8 for test_win failure
poing Mar 12, 2024
64075ff
Adjust test_with_UTF8 for test_win failure
poing Mar 12, 2024
dad10ac
Testing UTF on windows-2019
poing Mar 12, 2024
17a64f2
Testing UTF on windows-2019
poing Mar 12, 2024
6ebac4f
Testing UTF on windows-2019
poing Mar 12, 2024
40868da
Testing UTF on windows-2019
poing Mar 13, 2024
9584505
Testing UTF on windows-2019
poing Mar 13, 2024
73a3e39
Testing UTF on windows-2019
poing Mar 13, 2024
3602281
Revert the windows-2019 test
poing Mar 13, 2024
af17492
Testing default setting as a class
poing Mar 13, 2024
332b572
Chage the skip code
poing Mar 13, 2024
95f41e5
More python
poing Mar 13, 2024
96b4431
Disabled tests_win (for now)
poing Mar 13, 2024
bd51c4d
Documentation update
poing Mar 13, 2024
9aa7c43
Added some functions and test
poing Mar 15, 2024
bf71770
Added more functions and tests
poing Mar 15, 2024
5bc77d1
Added functions, tests, and other modifications
poing Mar 17, 2024
ce50237
JavaScript to Python is 60% completed
poing Mar 17, 2024
602ef98
Fixed exp and log tables, added horner()
poing Mar 18, 2024
3ecf7b9
Sucessfully created shares compatable with secrets.js-grempe
poing Mar 20, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .flake8
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[flake8]
per-file-ignores =
js2pysecrets/settings.py:E731
js2pysecrets/base.py:E203
58 changes: 29 additions & 29 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: [3.9]
python-version: [3.11]
os: [ubuntu-latest]
runs-on: ${{ matrix.os }}
steps:
Expand All @@ -36,7 +36,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: [3.9]
python-version: [3.11]
node-version: [latest]
os: [ubuntu-latest]
runs-on: ${{ matrix.os }}
Expand Down Expand Up @@ -72,7 +72,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: [3.9]
python-version: [3.11]
node-version: [latest]
os: [macos-latest]
runs-on: ${{ matrix.os }}
Expand All @@ -92,29 +92,29 @@ jobs:
- name: Run tests
run: make test

tests_win:
needs: linter
strategy:
fail-fast: false
matrix:
python-version: [3.9]
node-version: [latest]
os: [windows-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: npm
- name: Install Node dependencies
run: npm install
- name: Install Pip
run: pip install --user --upgrade pip
- name: Install project
run: pip install -e .[test]
- name: run tests
run: pytest -s -vvvv -l --tb=long tests
# tests_win:
# needs: linter
# strategy:
# fail-fast: false
# matrix:
# python-version: [3.11]
# node-version: [latest]
# os: [windows-latest]
# runs-on: ${{ matrix.os }}
# steps:
# - uses: actions/checkout@v4
# - uses: actions/setup-python@v5
# with:
# python-version: ${{ matrix.python-version }}
# - uses: actions/setup-node@v4
# with:
# node-version: ${{ matrix.node-version }}
# cache: npm
# - name: Install Node dependencies
# run: npm install
# - name: Install Pip
# run: pip install --user --upgrade pip
# - name: Install project
# run: pip install -e .[test]
# - name: run tests
# run: pytest -s -vvvv -l --tb=long tests
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ lint: ## Run pep8, black, mypy linters.
$(ENV_PREFIX)mypy --ignore-missing-imports js2pysecrets/

.PHONY: test
test: lint ## Run tests and generate coverage report.
$(ENV_PREFIX)pytest -v --cov-config .coveragerc --cov=js2pysecrets -l --tb=short --maxfail=1 tests/
test: lint ## Run tests and generate coverage report. Add -s for print
$(ENV_PREFIX)pytest -s -v --cov-config .coveragerc --cov=js2pysecrets -l --tb=short --maxfail=1 tests/
$(ENV_PREFIX)coverage xml
$(ENV_PREFIX)coverage html

Expand Down
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

[![codecov](https://codecov.io/gh/poing/JS2PySecrets/branch/main/graph/badge.svg?token=JS2PySecrets_token_here)](https://codecov.io/gh/poing/JS2PySecrets)
[![CI](https://github.com/poing/JS2PySecrets/actions/workflows/main.yml/badge.svg)](https://github.com/poing/JS2PySecrets/actions/workflows/main.yml)
[![Built with Material for MkDocs](https://img.shields.io/badge/Material_for_MkDocs-526CFE?logo=MaterialForMkDocs&logoColor=white)](https://squidfunk.github.io/mkdocs-material/)

[![JS2PySecrets Documentation](https://img.shields.io/badge/Documentation-white?labelColor=3F00FF&logo=data:image/svg%2bxml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48c3ZnIGlkPSJiIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNDEuNTUgMTUwLjUiPjxnIGlkPSJjIj48cGF0aCBkPSJNOTEuMy4yNWw1OC4yOC4wOGM2LjQ3LDAsMTEuNzIsNS4yNiwxMS43MiwxMS43M2gwYzAsNS4zLTIuMTEsMTAuMzktNS44NiwxNC4xNGwtMy41LDMuNWMtNi4wMyw2LjAzLTYuNDYsMTUuNjYtMS4wMSwyMi4yMWgwYzgsOS42LDIyLjczLDkuNiwzMC43MywwaDBjNS40Ni02LjU1LDUuMDItMTYuMTgtMS4wMS0yMi4yMWwtMy41LTMuNWMtMy43NS0zLjc1LTUuODYtOC44NC01Ljg2LTE0LjE0aDBjMC02LjQ3LDUuMjQtMTEuNzIsMTEuNzItMTEuNzNsNTguMjgtLjA4YzAsODIuMjktNjcuNzEsMTUwLTE1MCwxNTAtMjYuMzMsMC01Mi4yLTYuOTMtNzUtMjAuMWwyOS4xNy01MC41MmMzLjI0LTUuNiwxLjMyLTEyLjc3LTQuMjktMTZoMGMtNC41OS0yLjY1LTEwLjA1LTMuMzctMTUuMTgtMmwtNC43OCwxLjI4Yy04LjIzLDIuMjEtMTYuNzktMi4yMy0xOS43My0xMC4yM2gwYy00LjMxLTExLjcyLDMuMDYtMjQuNDgsMTUuMzYtMjYuNjFoMGM4LjQtMS40NSwxNi41MiwzLjc0LDE4LjczLDExLjk4bDEuMjgsNC43OGMxLjM3LDUuMTIsNC43Miw5LjQ5LDkuMzIsMTIuMTRoMGM1LjYsMy4yNCwxMi43NywxLjMyLDE2LTQuMjlMOTEuMy4yNVoiIHN0eWxlPSJmaWxsOiNmZmZmZmY7ICIvPjwvZz48L3N2Zz4=)](https://poing.github.io/JS2PySecrets/)



This is a `Python` implementation of [Shamir's threshold secret sharing scheme](http://en.wikipedia.org/wiki/Shamir's_Secret_Sharing), based **and compatible with** the `JavaScript` fork of `secrets.js` [*maintained by `grempe`*](https://github.com/grempe/secrets.js). Which is orginally based on the code created by `amper5and` on Github. The [original secrets.js can be found there](https://github.com/amper5and/secrets.js/).
Expand Down
Loading