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())
def jwk(e, n): """ Create JSON Web Key from RSA exponent end modulus """ return {"e": tobase64(e), "kty": "RSA", "n": tobase64(n)}
def jwk(e, n): """ Create JSON Web Key from RSA exponent end modulus """ return { "e": tobase64(e), "kty": "RSA", "n": tobase64(n) }