Skip to content

Instantly share code, notes, and snippets.

View athurg's full-sized avatar
🐵

Athurg Gooth athurg

🐵
View GitHub Profile
@athurg
athurg / crypt3.rb
Last active August 29, 2015 14:09 — forked from trans/crypt3.rb
独立于操作系统平台的Crypt函数(在各平台,比如OS X、Linux都可获得一致的结果)。
# Crypt3
#
# A ruby version of crypt(3), a salted one-way hashing of a password.
#
# The Ruby version was written by Poul-Henning Kamp.
#
# Copyright (c) 2002 Poul-Henning Kamp
#
# Adapted by guillaume__dot__pierronnet_at__laposte__dot_net based on
# * http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/325204/index_txt