在线文档教程
Ruby 2.4

Digest::RMD160

class Digest::RMD160

Parent:Digest::Base

一个计算消息摘要的类:使用的是由Hans Dobbertin,Antoon Bosselaers和Bart Preneel设计的RIPEMD-160密码散列函数。

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..."