# Path: locksmith/common.py
# def apicall(url, signkey, **params):
#     params['signature'] = get_signature(params, signkey)
#     data = sorted([(k,v) for k,v in params.iteritems()])
#     body = urllib.urlencode(data)
#     urllib2.urlopen(url, body)


from locksmith.common import apicall
    from django.conf import settings
import urllib2

try:
    SIGNING_KEY = settings.LOCKSMITH_SIGNING_KEY
    API_NAME = settings.LOCKSMITH_API_NAME
    ENDPOINT = settings.LOCKSMITH_HUB_URL.replace('analytics', 'accounts') + 'checkkey/'
except:
    SIGNING_KEY = ""
    API_NAME = ""
    ENDPOINT = ""

def check_key(key, signing_key=SIGNING_KEY, api=API_NAME, endpoint=ENDPOINT):
    try:

# Path: locksmith/common.py
# def apicall(url, signkey, **params):
#     params['signature'] = get_signature(params, signkey)
#     data = sorted([(k,v) for k,v in params.iteritems()])
#     body = urllib.urlencode(data)
#     urllib2.urlopen(url, body)


# Path: locksmith/lightauth/common.py
from locksmith.common import apicall
    from django.conf import settings
import urllib2


try:
    SIGNING_KEY = settings.LOCKSMITH_SIGNING_KEY
    API_NAME = settings.LOCKSMITH_API_NAME
    ENDPOINT = settings.LOCKSMITH_HUB_URL.replace('analytics', 'accounts') + 'checkkey/'
except:
    SIGNING_KEY = ""
    API_NAME = ""
    ENDPOINT = ""

def check_key(key, signing_key=SIGNING_KEY, api=API_NAME, endpoint=ENDPOINT):
    try:

        apicall(endpoint, signing_key,