File: session_generator.py

package info (click to toggle)
libapache2-mod-auth-gssapi 1.6.4-3
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 912 kB
  • sloc: ansic: 9,927; python: 1,114; yacc: 163; sh: 147; makefile: 132; lex: 25
file content (12 lines) | stat: -rw-r--r-- 344 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
#!/usr/bin/env python3
# Works with both python2 and python3; please preserve this property

# Copyright (C) 2016 mod_auth_gssapi contributors - See COPYING for (C) terms

# Simple script to generate GssapiSessionKey values

import base64
import os

bits = base64.b64encode(os.urandom(32))
print("GssapiSessionKey key:" + bits.decode('utf-8'))