mirror of
http://github.com/valkey-io/valkey
synced 2024-11-22 00:52:38 +00:00
redis-sha1.rb utility updated
This commit is contained in:
parent
454d4e43b5
commit
5ad3c8c852
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user