示例#1
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
示例#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
示例#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')