Beispiele
Example keys and passwords are public test material.
Flask Session: Verify Sha1
Eingabe
eyJyb2xlIjoic3VwZXJ1c2VyIiwidXNlciI6ImFkbWluIn0.aZ-KEw.E_x6bOhA4GU9t72pMinJUjN-O3IExpected answer
JSON{
"valid": true,
"payload": {
"role": "superuser",
"user": "admin"
}
}{
"valid": true,
"payload": {
"role": "superuser",
"user": "admin"
}
}- Schlüssel
{"string":"mysecretkey","option":"UTF8"}- Salz
{"string":"cookie-session","option":"UTF8"}- Algorithmus
sha1- Zeitstempel anzeigen
Off
Flask Session: Verify Sha1 Wrong Key
Eingabe
eyJyb2xlIjoic3VwZXJ1c2VyIiwidXNlciI6ImFkbWluIn0.aZ-KEw.E_x6bOhA4GU9t72pMinJUjN-O3IExpected rejection
Message containsInvalid signature!- Schlüssel
{"string":"notTheKey","option":"UTF8"}- Salz
{"string":"cookie-session","option":"UTF8"}- Algorithmus
sha1- Zeitstempel anzeigen
Off
Flask Session: Verify Sha1 Wrong Salt
Eingabe
eyJyb2xlIjoic3VwZXJ1c2VyIiwidXNlciI6ImFkbWluIn0.aZ-KEw.E_x6bOhA4GU9t72pMinJUjN-O3IExpected rejection
Message containsInvalid signature!- Schlüssel
{"string":"mysecretkey","option":"UTF8"}- Salz
{"string":"notTheSalt","option":"UTF8"}- Algorithmus
sha1- Zeitstempel anzeigen
Off
Flask Session: Verify Sha256
Eingabe
eyJyb2xlIjoic3VwZXJ1c2VyIiwidXNlciI6ImFkbWluIn0.aab3Ew.Jsx2DOx_H9anZg0YcvhsASxQ11897EFHeQfS2oja4y8Expected answer
JSON{
"valid": true,
"payload": {
"role": "superuser",
"user": "admin"
}
}{
"valid": true,
"payload": {
"role": "superuser",
"user": "admin"
}
}- Schlüssel
{"string":"mysecretkey","option":"UTF8"}- Salz
{"string":"cookie-session","option":"UTF8"}- Algorithmus
sha256- Zeitstempel anzeigen
Off
Flask Session: Verify Sha256 Wrong Key
Eingabe
eyJyb2xlIjoic3VwZXJ1c2VyIiwidXNlciI6ImFkbWluIn0.aab3Ew.Jsx2DOx_H9anZg0YcvhsASxQ11897EFHeQfS2oja4y8Expected rejection
Message containsInvalid signature!- Schlüssel
{"string":"notTheKey","option":"UTF8"}- Salz
{"string":"cookie-session","option":"UTF8"}- Algorithmus
sha256- Zeitstempel anzeigen
Off
Flask Session: Verify Sha256 Wrong Salt
Eingabe
eyJyb2xlIjoic3VwZXJ1c2VyIiwidXNlciI6ImFkbWluIn0.aab3Ew.Jsx2DOx_H9anZg0YcvhsASxQ11897EFHeQfS2oja4y8Expected rejection
Message containsInvalid signature!- Schlüssel
{"string":"mysecretkey","option":"UTF8"}- Salz
{"string":"notTheSalt","option":"UTF8"}- Algorithmus
sha256- Zeitstempel anzeigen
Off