Create S256 code_challenge with the given code_verifier.
(code_verifier)
| 14 | |
| 15 | |
| 16 | def create_s256_code_challenge(code_verifier): |
| 17 | """Create S256 code_challenge with the given code_verifier.""" |
| 18 | data = hashlib.sha256(to_bytes(code_verifier, "ascii")).digest() |
| 19 | return to_unicode(urlsafe_b64encode(data)) |
| 20 | |
| 21 | |
| 22 | def compare_plain_code_challenge(code_verifier, code_challenge): |
searching dependent graphs…