ライブラリ
- ビルトイン (447)
-
net
/ http (36) -
net
/ pop (36) - openssl (72)
-
rexml
/ document (12) -
rubygems
/ package / tar _ reader / entry (12) - securerandom (24)
- socket (12)
- stringio (28)
- strscan (24)
- win32ole (24)
クラス
-
ARGF
. class (14) -
Encoding
:: Converter (60) -
Encoding
:: InvalidByteSequenceError (84) -
Gem
:: Package :: TarReader :: Entry (12) - IO (14)
-
Net
:: POP3 (36) -
OpenSSL
:: BN (12) -
REXML
:: Child (12) - Random (19)
- Socket (12)
- String (202)
- StringIO (28)
- StringScanner (24)
-
WIN32OLE
_ VARIANT (24)
モジュール
- GC (22)
-
Net
:: HTTPHeader (36) -
OpenSSL
:: Random (48) - SecureRandom (12)
キーワード
-
1
. 6 . 8から1 . 8 . 0への変更点(まとめ) (12) - Cipher (12)
- GC (12)
- IO (7)
- InvalidByteSequenceError (12)
- Marshal フォーマット (12)
-
NEWS for Ruby 2
. 0 . 0 (12) -
NEWS for Ruby 2
. 6 . 0 (7) - SecureRandom (12)
- Symbol (1)
- byterindex (3)
-
bytes
_ read (12) - bytesize (12)
- byteslice (36)
- bytesplice (10)
-
content
_ range (12) -
destination
_ encoding (12) -
destination
_ encoding _ name (12) -
each
_ byte (38) - egd (12)
-
egd
_ bytes (12) -
error
_ bytes (12) - getbyte (12)
- getifaddrs (12)
-
incomplete
_ input? (12) -
n
_ bytes (12) -
n
_ mails (12) - new (21)
-
num
_ bytes (12) - peek (12)
- peep (12)
-
primitive
_ convert (24) -
primitive
_ errinfo (12) -
pseudo
_ bytes (12) - putback (24)
-
random
_ bytes (24) - range (12)
-
range
_ length (12) -
readagain
_ bytes (12) - scrub (36)
- scrub! (36)
-
set
_ debug _ output (12) -
source
_ encoding (12) -
source
_ encoding _ name (12) - stat (22)
- vartype (12)
検索結果
先頭5件
-
Net
:: POP3 # set _ debug _ output(f) -> () (6.0) -
デバッグ用の出力 f をセットします。
...re 'net/pop'
pop = Net::POP3.new('pop.example.com', 110)
pop.set_debug_output $stderr
pop.start('YourAccount', 'YourPassword') {
p pop.n_bytes
}
実行結果:
POP session started: pop.example.com:110 (POP)
-> "+OK popd <1162042773.26346.155555a1861c@pop.example.com>\r\n"
<- "APO... -
OpenSSL
:: Cipher (6.0) -
共通鍵暗号のために抽象化されたインターフェースを提供するクラスです。
...# 暗号化するデータ
data = "*secret data*"
# パスワード
pass = "**secret password**"
# salt
salt = OpenSSL::Random.random_bytes(8)
# 暗号化器を作成する
enc = OpenSSL::Cipher.new("AES-256-CBC")
enc.encrypt
# 鍵とIV(Initialize Vector)を PKCS#5 に従っ... -
OpenSSL
:: Random . # egd(filename) -> true (6.0) -
EGD(Entropy Gathering Daemon) からエントロピーを得、 乱数生成器に追加します。
...ます。
filename で指定した Unix domain socket から EGD に問い合わせ、
255 バイト分のエントロピーを取得します。
OpenSSL::Random.egd_bytes(filename, 255) と同じです。
@param filename EGD のソケットのファイル名
@raise OpenSSL::Random::RandomError... -
String
# each _ byte -> Enumerator (6.0) -
文字列の各バイトに対して繰り返します。
...文字列の各バイトに対して繰り返します。
//emlist[例][ruby]{
"str".each_byte do |byte|
p byte
end
# => 115
# => 116
# => 114
"あ".each_byte do |byte|
p byte
end
# => 227
# => 129
# => 130
//}
@see String#bytes... -
String
# each _ byte {|byte| . . . } -> self (6.0) -
文字列の各バイトに対して繰り返します。
...文字列の各バイトに対して繰り返します。
//emlist[例][ruby]{
"str".each_byte do |byte|
p byte
end
# => 115
# => 116
# => 114
"あ".each_byte do |byte|
p byte
end
# => 227
# => 129
# => 130
//}
@see String#bytes... -
String
# getbyte(index) -> Integer | nil (6.0) -
index バイト目のバイトを整数で返します。
...す。
範囲外を指定した場合は nil を返します。
@param index バイトを取り出す位置
//emlist[例][ruby]{
s = "tester"
s.bytes # => [116, 101, 115, 116, 101, 114]
s.getbyte(0) # => 116
s.getbyte(1) # => 101
s.getbyte(-1) # => 114
s.getbyte(6)... -
Symbol (6.0)
-
シンボルを表すクラス。シンボルは任意の文字列と一対一に対応するオブジェクトです。
...動いている間
はずっと保持しつづけられます。そのため、以下のようなコード
rng = Random.new
100000.times { rng.bytes(1000).intern }
はテーブルのサイズを増大させ、メモリを圧迫します。
例えば web アプリケーションのようなプ...