diff options
author | Lars Wirzenius <liw@liw.fi> | 2018-02-09 13:53:33 +0200 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2018-02-09 13:56:43 +0200 |
commit | f1f291b270b96fe1511286cb807f02c9741b0d71 (patch) | |
tree | 509a7f697685e9282fbdc6838fb037ff6cb5e4dd /qvisqve-hash | |
parent | 3b208da0461f5a129fcbc527fbfdd9ed8309d077 (diff) | |
download | qvisqve-f1f291b270b96fe1511286cb807f02c9741b0d71.tar.gz |
Rename: to Qvisqve
Diffstat (limited to 'qvisqve-hash')
-rwxr-xr-x | qvisqve-hash | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/qvisqve-hash b/qvisqve-hash new file mode 100755 index 0000000..7a93ab7 --- /dev/null +++ b/qvisqve-hash @@ -0,0 +1,36 @@ +#!/usr/bin/env python3 +# Copyright (C) 2017 Lars Wirzenius +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see <http://www.gnu.org/licenses/>. + + +# Run this and type the client secret at the prompt. Output is some YAML +# that can be copy-pasted into the Qvisqve config file. + + +import getpass +import sys + + +import yaml + + +import qvisqve_secrets + + +prompt = 'Give secret: ' +secret = getpass.getpass(prompt) +sh = qvisqve_secrets.SecretHasher() +hashed = sh.hash(secret) +yaml.safe_dump(hashed, sys.stdout, default_flow_style=False) |