模块 OpenSSL::PKCS5

公共实例方法

pbkdf2_hmac(pass, salt, iter, keylen, digest) 点击切换源代码

OpenSSL::PKCS5.pbkdf2_hmac 已重命名为 OpenSSL::KDF.pbkdf2_hmac。此方法是为了向后兼容而提供的。

# File openssl/lib/openssl/pkcs5.rb, line 13
def pbkdf2_hmac(pass, salt, iter, keylen, digest)
  OpenSSL::KDF.pbkdf2_hmac(pass, salt: salt, iterations: iter,
                           length: keylen, hash: digest)
end
pbkdf2_hmac_sha1(pass, salt, iter, keylen) 点击切换源代码
# File openssl/lib/openssl/pkcs5.rb, line 18
def pbkdf2_hmac_sha1(pass, salt, iter, keylen)
  pbkdf2_hmac(pass, salt, iter, keylen, "sha1")
end