36件ヒット
[1-36件を表示]
(0.015秒)
検索結果
-
OpenSSL
:: PKey :: RSA (18112.0) -
RSA 暗号鍵のクラスです。
...RSA 暗号鍵のクラスです。
通常このクラスで利用するのは、
OpenSSL::PKey::RSA.generate, OpenSSL::PKey::RSA.new,
OpenSSL::PKey::RSA#public?, OpenSSL::PKey::RSA#private?,
OpenSSL::PKey::RSA#public_key, OpenSSL::PKey::RSA#to_text,
OpenSSL::PKey::RSA#to_pem, OpenSSL::PKey::RSA#to_......ソッドを利用するときは
RSA についてよく理解し、必要な場合のみにすべきです。
例:
require 'openssl'
# initialize random seed
OpenSSL::Random.seed(File.read("/dev/random", 16))
# 鍵対を生成
rsa = OpenSSL::PKey::RSA.generate(2048)
# 秘密鍵をAES......|f|
f.write(rsa.export(OpenSSL::Cipher.new("aes256"), passphrase))
end
# 公開鍵をpublic_key.pemに保存
public_key = rsa.public_key
File.open("public_key.pem", "w") do |f|
f.write(public_key.export)
end
# 秘密鍵で署名
data = "foobar"
sign = rsa.sign("sha256", d... -
ruby 1
. 8 . 2 feature (72.0) -
ruby 1.8.2 feature ruby 1.8.2 での ruby 1.8.1 からの変更点です。
...削除されました。
((<ruby-dev:25206>))?
: OpenSSL::PKey::RSA.public_encrypt [lib] [compat]
: OpenSSL::PKey::RSA.public_decrypt [lib] [compat]
: OpenSSL::PKey::RSA.private_encrypt [lib] [compat]
: OpenSSL::PKey::RSA.private_decrypt [lib] [compat]
パディングを指定出来る......ようになりました。((<ruby-talk:122539>))。PKCS1_PADDING, SSLV23_PADDING, NO_PADDING and PKCS1_OAEP_PADDING under OpenSSL::PKey::RSA.
=== 2004-12-05
: OptionParser::Completion#complete [lib] [compat]
new parameter to direct case insensitiveness.
: OptionParser#order! [lib]......]
セッションを保存するファイル名にセッション ID が使われるバグを修正しました。
=== 2004-08-23
: OpenSSL::SSL#pending [lib] [new]
=== 2004-08-14
: FileUtils.copy_entry [lib] [new]
: FileUtils::DryRun [lib] [new]
追加。
: FileUtils.mv [lib] [compat]
mv... -
OpenSSL
:: SSL :: SSLServer (18.0) -
SSL サーバーのためのクラス。
...include OpenSSL
ctx = SSL::SSLContext.new()
ctx.cert = X509::Certificate.new(File.read('cert.pem'))
ctx.key = PKey::RSA.new(File.read('privkey.pem'))
svr = TCPServer.new(2007)
serv = SSL::SSLServer.new(svr, ctx)
loop do
while soc = serv.accept
puts soc.read
end
end...