Skip to content

Instantly share code, notes, and snippets.

@npdgm
npdgm / elasticsearch-pbkdf2.py
Last active July 5, 2022 13:04
Python script to generate PBKDF2 password hashes for ElasticSearch xpack
#!/usr/bin/env python3
try:
import argparse
from getpass import getpass
from secrets import token_bytes
from binascii import b2a_base64
from hashlib import pbkdf2_hmac
except ImportError as err:
print('Python 3.6 or newer is required!\n')