Skip to content

Instantly share code, notes, and snippets.

View twiddern's full-sized avatar
🏳️‍🌈

twiddern

🏳️‍🌈
View GitHub Profile
@twiddern
twiddern / junos_crypt.py
Created November 12, 2017 02:12 — forked from daemonkeeper/junos_crypt.py
Junos reversible passphrase generator
def junos_crypt(plain, salt=None, stable_crypt=False):
"""
create and return a reversible Junos crypted passphrase,
which can be used as a passphrase in places where the plain
text must be accessible to the RE, such as BGP peerings
:param plain: plain text passphrase
:param salt: salt
:param stable_crypt: always return the same hash without rotation