Digest::RMD160 类
用于计算消息摘要的类,使用 RIPEMD-160 加密哈希函数,由 Hans Dobbertin、Antoon Bosselaers 和 Bart Preneel 设计。
RMD160
计算 160 位(20 字节)的摘要。
示例¶ ↑
require 'digest' # Compute a complete digest Digest::RMD160.hexdigest 'abc' #=> "8eb208f7..." # Compute digest by chunks rmd160 = Digest::RMD160.new # =>#<Digest::RMD160> rmd160.update "ab" rmd160 << "c" # alias for #update rmd160.hexdigest # => "8eb208f7..." # Use the same object to compute another digest rmd160.reset rmd160 << "message" rmd160.hexdigest # => "1dddbe1b..."