Skip to content

Instantly share code, notes, and snippets.

@maoo
Last active August 29, 2015 14:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save maoo/bf0c0fa33a1c5d077532 to your computer and use it in GitHub Desktop.
Save maoo/bf0c0fa33a1c5d077532 to your computer and use it in GitHub Desktop.
Encrypt password for alfresco-global.properties
# Taken from http://www.giuseppeurso.eu/en/alfresco-tips-and-tricks-1-reset-the-admin-password/
import sys
import hashlib
if len(sys.argv) > 1:
passwd = sys.argv[1]
print "Encrypting password '%s'" % passwd
passwd.encode('utf-16le')
print "Encryped password is '%s'" % hashlib.new('md4', passwd.encode('utf-16le')).hexdigest()
else:
print "Usage: python encrypt-md4.py my_password"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment