def extend_password_with_yubikey(password, options, YubiKey=None):
    if YubiKey is None:
        from ykpers import YubiKey
    yk = YubiKey.open_first_key()
    response = yk.hmac_challenge_response(
        signing_uuid.bytes, slot=options['yubikey-slot'])
    return hexlify(response) + ':' + password
Exemple #2
0
def extend_password_with_yubikey(password, options, YubiKey=None):
    if YubiKey is None:
        from ykpers import YubiKey
    yk = YubiKey.open_first_key()
    response = yk.hmac_challenge_response(signing_uuid.bytes,
                                          slot=options['yubikey-slot'])
    return hexlify(response) + ':' + password
Exemple #3
0
# Copyright (c) Aaron Gallagher <*****@*****.**>
# See COPYING for details.

from ykpers import YubiKey

yk = YubiKey.open_first_key()
print 'yubikey {0.versionMajor}.{0.versionMinor}'.format(yk.get_status())
print 'slot 1:', yk.hmac_challenge_response('hi').encode('hex')
print 'slot 2:', yk.hmac_challenge_response('hi', slot=2).encode('hex')