Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
redis
Commits
5ad3c8c8
Commit
5ad3c8c8
authored
Dec 10, 2009
by
antirez
Browse files
redis-sha1.rb utility updated
parent
454d4e43
Changes
1
Hide whitespace changes
Inline
Side-by-side
utils/redis-sha1.rb
View file @
5ad3c8c8
...
@@ -24,6 +24,8 @@ def redisSha1(opts={})
...
@@ -24,6 +24,8 @@ def redisSha1(opts={})
sha1
=
Digest
::
SHA1
.
hexdigest
(
sha1
+
r
.
list_range
(
k
,
0
,
-
1
).
join
(
"
\x01
"
))
sha1
=
Digest
::
SHA1
.
hexdigest
(
sha1
+
r
.
list_range
(
k
,
0
,
-
1
).
join
(
"
\x01
"
))
elsif
vtype
==
"set"
elsif
vtype
==
"set"
sha1
=
Digest
::
SHA1
.
hexdigest
(
sha1
+
r
.
set_members
(
k
).
to_a
.
sort
.
join
(
"
\x02
"
))
sha1
=
Digest
::
SHA1
.
hexdigest
(
sha1
+
r
.
set_members
(
k
).
to_a
.
sort
.
join
(
"
\x02
"
))
elsif
vtype
==
"zset"
sha1
=
Digest
::
SHA1
.
hexdigest
(
sha1
+
r
.
zrange
(
k
,
0
,
-
1
).
join
(
"
\x01
"
))
end
end
}
}
sha1
sha1
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment