cram_md5 0.0.5 → 0.0.6
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/cram_md5/version.rb +1 -1
- data/lib/cram_md5.rb +4 -4
- metadata +2 -3
data/lib/cram_md5/version.rb
CHANGED
data/lib/cram_md5.rb
CHANGED
@@ -10,7 +10,7 @@ module CramMd5
|
|
10
10
|
while (n - 1 >= 0)
|
11
11
|
n = n - 1
|
12
12
|
|
13
|
-
ret = ret + ITOA64[v & 0x3f]
|
13
|
+
ret = ret + ITOA64[v & 0x3f].chr
|
14
14
|
v = v >> 6
|
15
15
|
end
|
16
16
|
ret
|
@@ -70,7 +70,7 @@ module CramMd5
|
|
70
70
|
if (i & 1) > 0
|
71
71
|
ctx = ctx + 0.chr #if ($i & 1) { $ctx->add(pack("C", 0)); }
|
72
72
|
else
|
73
|
-
ctx = ctx + pw[0]
|
73
|
+
ctx = ctx + pw[0].chr
|
74
74
|
end
|
75
75
|
i = i >> 1
|
76
76
|
end
|
@@ -126,10 +126,10 @@ module CramMd5
|
|
126
126
|
|
127
127
|
chars_length = (chars.length - 1);
|
128
128
|
|
129
|
-
string = chars[rand(chars_length)];
|
129
|
+
string = chars[rand(chars_length)].chr;
|
130
130
|
i=0
|
131
131
|
while(string.length<max_length)
|
132
|
-
c = chars[rand(chars_length)];
|
132
|
+
c = chars[rand(chars_length)].chr;
|
133
133
|
|
134
134
|
string += c if (c != string[string.length - 1])
|
135
135
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cram_md5
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.6
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-10-
|
12
|
+
date: 2012-10-24 00:00:00.000000000Z
|
13
13
|
dependencies: []
|
14
14
|
description: ! "\n unix_md5_crypt() provides a crypt()-compatible interface to the\n
|
15
15
|
\ rather old MD5-based crypt() function found in modern operating systems\n using
|
@@ -52,4 +52,3 @@ signing_key:
|
|
52
52
|
specification_version: 3
|
53
53
|
summary: unix_md5_crypt CRAM-MD5 or Crypt MD5
|
54
54
|
test_files: []
|
55
|
-
has_rdoc:
|