Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
CIRCLE
/
django-sshkey
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
9d4ed075
authored
Mar 25, 2014
by
Scott Duckworth
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
move sshkey_re to util.py
parent
57301416
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
4 deletions
+5
-4
django_sshkey/models.py
+1
-4
django_sshkey/util.py
+4
-0
No files found.
django_sshkey/models.py
View file @
9d4ed075
...
...
@@ -18,10 +18,7 @@
from
django.db
import
models
from
django.contrib.auth.models
import
User
from
django.core.exceptions
import
ValidationError
from
django_sshkey.util
import
sshkey_fingerprint
import
re
sshkey_re
=
re
.
compile
(
r'(?P<type>[\w-]+)\s+(?P<b64key>\S+)(?:\s+(?P<comment>\S+))?$'
)
from
django_sshkey.util
import
sshkey_re
,
sshkey_fingerprint
class
UserKey
(
models
.
Model
):
user
=
models
.
ForeignKey
(
User
,
db_index
=
True
)
...
...
django_sshkey/util.py
View file @
9d4ed075
...
...
@@ -15,6 +15,10 @@
# You should have received a copy of the GNU Lesser General Public License
# along with django-sshkey. If not, see <http://www.gnu.org/licenses/>.
import
re
sshkey_re
=
re
.
compile
(
r'(?P<type>[\w-]+)\s+(?P<b64key>\S+)(?:\s+(?P<comment>\S.+))?$'
)
def
sshkey_fingerprint
(
b64key
):
import
base64
import
hashlib
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment