Project

smbhash

0.01
Low commit activity in last 3 years
No release in over a year
An implementation of lanman and nt md4 hash functions for use in Samba style smbpasswd entries
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

>= 0
~> 2.14
 Project Readme

ruby-smbhash

Build Status Gem Version

Description

ruby-smbhash is a implementation of lanman and nt md4 hash functions for use in Samba style smbpasswd entries. It was stripped from ActiveSambaLDAP (http://asl.rubyforge.org/activesambaldap/)

Tested Ruby Versions

  • MRI 1.8.6
  • MRI 1.9.2
  • MRI 1.9.3
  • MRI 2.0.0
  • MRI 2.1.1
  • MRI 3.0.4
  • MRI 3.1.2

Usage

require 'smbhash'

Smbhash.lm_hash    "password"
# => "E52CAC67419A9A224A3B108F3FA6CB6D"

Smbhash.ntlm_hash  "password"
# => "8846F7EAEE8FB117AD06BDD830B7586C"

Smbhash.ntlmgen    "password"
# => ["E52CAC67419A9A224A3B108F3FA6CB6D", "8846F7EAEE8FB117AD06BDD830B7586C"]

Credits

  • ActiveSambaLDAP project for sharing the code
  • jon-mercer for porting it to ruby 1.9