1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
|
%global _empty_manifest_terminate_build 0
Name: python-argon2
Version: 0.1.10
Release: 1
Summary: Bindings for the argon2 password hasher
License: CC0
URL: https://github.com/flamewow/argon2_py
Source0: https://mirrors.aliyun.com/pypi/web/packages/5c/55/94605d5bfa140601fde256f548ed1733a5327f2d7d159b60a727e8613170/argon2-0.1.10.tar.gz
BuildArch: noarch
%description
Python bindings for argon2 : https://github.com/P-H-C/phc-winner-argon2
Installation:
You can install argon2_py from this repository if you want the latest but possibly non-compiling version:
$ git clone --recursive https://github.com/flamewow/argon2_py
$ cd argon2_py
$ python setup.py build
Activate virtualenv (or use sudo):
$ python setup.py install
Or you can install the latest release from PYPI:
$ pip install argon2
>>> argon2.argon2_hash.__doc__
This is argon2 hashing function
t - time cost, which defines the amount of computation realized and therefore the execution time, given in number of iterations
m - memory cost, which defines the memory usage, given in kibibytes
p - parallelism degree, which defines the number of parallel threads
Examples:
>>> import argon2
>>> argon2.argon2_hash("password", "some_salt", )
b'\xa8&x\xc7\xd9\xc4\x1f\xdf[2\xd9hq\xab\xe5\xb4WV\x89\xca\xa4\xee\xb3\x98\xf1I\xd1\xdaf\xe7=\xfaA\x04\xeb\xe1\xfd\x94)\xad\x84\r\x9ed<8xE\xc3\xd3\xfb\x13\xcbN\xcf\\}\xfd-9\x8b\x07@\xd8\x10\x1a\x83\x05\xd5\xfd\xc4m\x9f\xd7\x81\xdcX\x87\xb2\x02\xa9R\xc1\x9d\xaf6\xbb\x8c\xe1vH+\x07\xc7Y\x80\xb3\xb5\xf8\xba\xbd\x87\xd8\xf5\xea\x1a\x04V&\xf7\xde\x9b\x93\x8dbQ\x91e\xf6\xd6\xa2\xd8G8\xe3\x9a\x03\xf3'
_________________________________________________________________________________________________
>>> import argon2
>>> argon2.argon2_hash(password="some password", salt="some salt", t=16, m=8, p=1, buflen=128, argon_type=argon2.Argon2Type.Argon2_i)
b"\x1f>\xe0\xb8\x88%\xef\xee\xb3n\\\xb85\x03\x14\xb8\xb8O\x02Zk\xbf<\xd5\xa0C\xf2,p\x00\xda\xd7Bc\xa71\x84\x10\x00\x8cx'\xec?Q\x8499\x9b\xd4)\xf1\x98F\x13!\x8bB\x12!\xc3U\x8d\x9a\xb5\x10\x8cIo\xd2p\xcd'\x8c\x96d\xa5?{\x1d*\xaf\xab\x99\x9e\xe9c\xa4\xb7\xb2\x00\xfa\x82\x96/\xdei_1Nun\x92j\n\xf3D#\x05\tj\xa2\x92\xd5\xf4nym\xd1Kq\xa1|\xd19\xa9Q8"
%package -n python3-argon2
Summary: Bindings for the argon2 password hasher
Provides: python-argon2
BuildRequires: python3-devel
BuildRequires: python3-setuptools
BuildRequires: python3-pip
%description -n python3-argon2
Python bindings for argon2 : https://github.com/P-H-C/phc-winner-argon2
Installation:
You can install argon2_py from this repository if you want the latest but possibly non-compiling version:
$ git clone --recursive https://github.com/flamewow/argon2_py
$ cd argon2_py
$ python setup.py build
Activate virtualenv (or use sudo):
$ python setup.py install
Or you can install the latest release from PYPI:
$ pip install argon2
>>> argon2.argon2_hash.__doc__
This is argon2 hashing function
t - time cost, which defines the amount of computation realized and therefore the execution time, given in number of iterations
m - memory cost, which defines the memory usage, given in kibibytes
p - parallelism degree, which defines the number of parallel threads
Examples:
>>> import argon2
>>> argon2.argon2_hash("password", "some_salt", )
b'\xa8&x\xc7\xd9\xc4\x1f\xdf[2\xd9hq\xab\xe5\xb4WV\x89\xca\xa4\xee\xb3\x98\xf1I\xd1\xdaf\xe7=\xfaA\x04\xeb\xe1\xfd\x94)\xad\x84\r\x9ed<8xE\xc3\xd3\xfb\x13\xcbN\xcf\\}\xfd-9\x8b\x07@\xd8\x10\x1a\x83\x05\xd5\xfd\xc4m\x9f\xd7\x81\xdcX\x87\xb2\x02\xa9R\xc1\x9d\xaf6\xbb\x8c\xe1vH+\x07\xc7Y\x80\xb3\xb5\xf8\xba\xbd\x87\xd8\xf5\xea\x1a\x04V&\xf7\xde\x9b\x93\x8dbQ\x91e\xf6\xd6\xa2\xd8G8\xe3\x9a\x03\xf3'
_________________________________________________________________________________________________
>>> import argon2
>>> argon2.argon2_hash(password="some password", salt="some salt", t=16, m=8, p=1, buflen=128, argon_type=argon2.Argon2Type.Argon2_i)
b"\x1f>\xe0\xb8\x88%\xef\xee\xb3n\\\xb85\x03\x14\xb8\xb8O\x02Zk\xbf<\xd5\xa0C\xf2,p\x00\xda\xd7Bc\xa71\x84\x10\x00\x8cx'\xec?Q\x8499\x9b\xd4)\xf1\x98F\x13!\x8bB\x12!\xc3U\x8d\x9a\xb5\x10\x8cIo\xd2p\xcd'\x8c\x96d\xa5?{\x1d*\xaf\xab\x99\x9e\xe9c\xa4\xb7\xb2\x00\xfa\x82\x96/\xdei_1Nun\x92j\n\xf3D#\x05\tj\xa2\x92\xd5\xf4nym\xd1Kq\xa1|\xd19\xa9Q8"
%package help
Summary: Development documents and examples for argon2
Provides: python3-argon2-doc
%description help
Python bindings for argon2 : https://github.com/P-H-C/phc-winner-argon2
Installation:
You can install argon2_py from this repository if you want the latest but possibly non-compiling version:
$ git clone --recursive https://github.com/flamewow/argon2_py
$ cd argon2_py
$ python setup.py build
Activate virtualenv (or use sudo):
$ python setup.py install
Or you can install the latest release from PYPI:
$ pip install argon2
>>> argon2.argon2_hash.__doc__
This is argon2 hashing function
t - time cost, which defines the amount of computation realized and therefore the execution time, given in number of iterations
m - memory cost, which defines the memory usage, given in kibibytes
p - parallelism degree, which defines the number of parallel threads
Examples:
>>> import argon2
>>> argon2.argon2_hash("password", "some_salt", )
b'\xa8&x\xc7\xd9\xc4\x1f\xdf[2\xd9hq\xab\xe5\xb4WV\x89\xca\xa4\xee\xb3\x98\xf1I\xd1\xdaf\xe7=\xfaA\x04\xeb\xe1\xfd\x94)\xad\x84\r\x9ed<8xE\xc3\xd3\xfb\x13\xcbN\xcf\\}\xfd-9\x8b\x07@\xd8\x10\x1a\x83\x05\xd5\xfd\xc4m\x9f\xd7\x81\xdcX\x87\xb2\x02\xa9R\xc1\x9d\xaf6\xbb\x8c\xe1vH+\x07\xc7Y\x80\xb3\xb5\xf8\xba\xbd\x87\xd8\xf5\xea\x1a\x04V&\xf7\xde\x9b\x93\x8dbQ\x91e\xf6\xd6\xa2\xd8G8\xe3\x9a\x03\xf3'
_________________________________________________________________________________________________
>>> import argon2
>>> argon2.argon2_hash(password="some password", salt="some salt", t=16, m=8, p=1, buflen=128, argon_type=argon2.Argon2Type.Argon2_i)
b"\x1f>\xe0\xb8\x88%\xef\xee\xb3n\\\xb85\x03\x14\xb8\xb8O\x02Zk\xbf<\xd5\xa0C\xf2,p\x00\xda\xd7Bc\xa71\x84\x10\x00\x8cx'\xec?Q\x8499\x9b\xd4)\xf1\x98F\x13!\x8bB\x12!\xc3U\x8d\x9a\xb5\x10\x8cIo\xd2p\xcd'\x8c\x96d\xa5?{\x1d*\xaf\xab\x99\x9e\xe9c\xa4\xb7\xb2\x00\xfa\x82\x96/\xdei_1Nun\x92j\n\xf3D#\x05\tj\xa2\x92\xd5\xf4nym\xd1Kq\xa1|\xd19\xa9Q8"
%prep
%autosetup -n argon2-0.1.10
%build
%py3_build
%install
%py3_install
install -d -m755 %{buildroot}/%{_pkgdocdir}
if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi
if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi
if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi
if [ -d examples ]; then cp -arf examples %{buildroot}/%{_pkgdocdir}; fi
pushd %{buildroot}
if [ -d usr/lib ]; then
find usr/lib -type f -printf "\"/%h/%f\"\n" >> filelist.lst
fi
if [ -d usr/lib64 ]; then
find usr/lib64 -type f -printf "\"/%h/%f\"\n" >> filelist.lst
fi
if [ -d usr/bin ]; then
find usr/bin -type f -printf "\"/%h/%f\"\n" >> filelist.lst
fi
if [ -d usr/sbin ]; then
find usr/sbin -type f -printf "\"/%h/%f\"\n" >> filelist.lst
fi
touch doclist.lst
if [ -d usr/share/man ]; then
find usr/share/man -type f -printf "\"/%h/%f.gz\"\n" >> doclist.lst
fi
popd
mv %{buildroot}/filelist.lst .
mv %{buildroot}/doclist.lst .
%files -n python3-argon2 -f filelist.lst
%dir %{python3_sitelib}/*
%files help -f doclist.lst
%{_docdir}/*
%changelog
* Thu Jun 08 2023 Python_Bot <Python_Bot@openeuler.org> - 0.1.10-1
- Package Spec generated
|