library digest/hmac
要約
キー付きハッシュアルゴリズム HMAC(Keyed-Hashing for Message Authentication code) の実装の一つを提供するライブラリです。
このライブラリは実験的な実装なので openssl に含まれている OpenSSL::HMAC を使ってください。
HMAC は [RFC2104] で定義されています。
例
require 'digest/hmac' # one-liner example puts Digest::HMAC.hexdigest("data", "hash key", Digest::SHA1) # rather longer one hmac = Digest::HMAC.new("foo", Digest::RMD160) buf = "" while stream.read(16384, buf) hmac.update(buf) end puts hmac.bubblebabble
クラス
class Digest::HMAC | キー付きハッシュアルゴリズム HMAC の実装の一つを提供するクラスです。 |
同時にrequireされるライブラリ
digest | メッセージダイジェストライブラリです。 |
digest/md5 | [RFC1321] に記述されている RSA Data Security, Inc. の MD5 Message-Digest Algorithmを実装するクラスを提供するライブラリです。 |
digest/rmd160 | Hans Dobbertin, Antoon Bosselaers, Bart Preneel によって設計された RIPEMD-160 ハッシュ関数を実装するクラスを提供するライブラリです。 |
digest/sha1 | NIST (the US' National Institute of Standards and Technology) のSHA-1 Secure Hash Algorithmを実装するクラスを提供するライブラリです。 |
digest/sha2 | FIPS PUB 180-2に記述されているNIST (the US' National Institute of Standards and Technology) の以下のアルゴリズムを実装するクラスを提供す るライブラリです。 |
library digest/hmac