$14 GRAYBYTE WORDPRESS FILE MANAGER $44

SERVER : vnpttt-amd7f72-h1.vietnix.vn #1 SMP Fri May 24 12:42:50 UTC 2024
SERVER IP : 103.200.23.149 | ADMIN IP 216.73.216.22
OPTIONS : CRL = ON | WGT = ON | SDO = OFF | PKEX = OFF
DEACTIVATED : NONE

/lib64/python3.6/site-packages/cryptography/hazmat/primitives/twofactor/

HOME
Current File : /lib64/python3.6/site-packages/cryptography/hazmat/primitives/twofactor//utils.py
# This file is dual licensed under the terms of the Apache License, Version
# 2.0, and the BSD License. See the LICENSE file in the root of this repository
# for complete details.

from __future__ import absolute_import, division, print_function

import base64

from six.moves.urllib.parse import quote, urlencode


def _generate_uri(hotp, type_name, account_name, issuer, extra_parameters):
    parameters = [
        ("digits", hotp._length),
        ("secret", base64.b32encode(hotp._key)),
        ("algorithm", hotp._algorithm.name.upper()),
    ]

    if issuer is not None:
        parameters.append(("issuer", issuer))

    parameters.extend(extra_parameters)

    uriparts = {
        "type": type_name,
        "label": (
            "%s:%s" % (quote(issuer), quote(account_name))
            if issuer
            else quote(account_name)
        ),
        "parameters": urlencode(parameters),
    }
    return "otpauth://{type}/{label}?{parameters}".format(**uriparts)

Current_dir [ NOT WRITEABLE ] Document_root [ WRITEABLE ]


[ Back ]
NAME
SIZE
LAST TOUCH
USER
CAN-I?
FUNCTIONS
..
--
29 Aug 2025 9.28 PM
root / root
0755
__pycache__
--
29 Aug 2025 9.28 PM
root / root
0755
__init__.py
0.281 KB
28 Oct 2020 10.11 AM
root / root
0644
hotp.py
2.616 KB
28 Oct 2020 10.11 AM
root / root
0644
totp.py
1.738 KB
28 Oct 2020 10.11 AM
root / root
0644
utils.py
0.959 KB
28 Oct 2020 10.11 AM
root / root
0644

GRAYBYTE WORDPRESS FILE MANAGER @ 2026 CONTACT ME
Static GIF