示例#1
0
def jwkthumb(e, n):
    """
        JSON Web Key Thumbprint SHA256 from RSA exponent end modulus
        """

    js = '{"e":"%s","kty":"RSA","n":"%s"}' % (tobase64(e), tobase64(n))
    return tobase64(hashlib.sha256(tobytes(js)).digest())
示例#2
0
def jwkthumb(e, n):
        """
        JSON Web Key Thumbprint SHA256 from RSA exponent end modulus
        """

        js = '{"e":"%s","kty":"RSA","n":"%s"}' % (tobase64(e), tobase64(n))
        return tobase64(hashlib.sha256(tobytes(js)).digest())
示例#3
0
def jwk(e, n):
    """
        Create JSON Web Key from RSA exponent end modulus
        """

    return {"e": tobase64(e), "kty": "RSA", "n": tobase64(n)}
示例#4
0
def jwk(e, n):
        """
        Create JSON Web Key from RSA exponent end modulus
        """

        return { "e": tobase64(e), "kty": "RSA", "n": tobase64(n) }