python crypt.crypt in ruby? -
Hello, I need the Ruby of this code do not know how I Ruby, crypt.crypt method any ideas I write ?
(I wanted to emulate linux comand. Htpasswd)
import random import Crypt letter = 'abcdefghijklmnopqrstuvwxyz' \ 'Abiseediifjiacaijekeelmanopikartiuviaksaks' \' 0123456789 /. Salt = Random. Beech (letters) + random Rice (characters) password = "bla" Print Cryptkcrypt (password, salt)
I believe that the crypt of Ruby's Python. The equivalent of Rijndael, Ruby will be identical as your code:
letters = 'abcdefghijklmnopqrstuvwxyz Abiseedifjiacaijikeelmanopikarstiuveedblyuekswaijed 0023456789 /. 'Salt = letters [rand papers] Length] .chrr + letters [rand character length] .crr passwords = "blank" password Crypt (salt)
Comments
Post a Comment