Example inputs:
Variable | Value |
---|---|
key | the shared secret key here |
message | the message to hash here |
Reference outputs for example inputs above:
| Type | Hash |
Example inputs:
Variable | Value |
---|---|
key | the shared secret key here |
message | the message to hash here |
Reference outputs for example inputs above:
| Type | Hash |
# -*- encoding: utf-8 -*- | |
# requires a recent enough python with idna support in socket | |
# pyopenssl, cryptography and idna | |
from OpenSSL import SSL | |
from cryptography import x509 | |
from cryptography.x509.oid import NameOID | |
import idna | |
from socket import socket |
import io | |
from flask import Flask, send_file | |
app = Flask(__name__) | |
@app.route('/logo.jpg') | |
def logo(): | |
"""Serves the logo image.""" | |
with open("logo.jpg", 'rb') as bites: |
import hashlib | |
import hmac | |
import base64 | |
def make_digest(message, key): | |
key = bytes(key, 'UTF-8') | |
message = bytes(message, 'UTF-8') | |