Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
$b からの生のバイト文字列があります
$b=sha1($k,true);
$b[$ix] の値を知る必要があります。私が見つけた唯一の方法は
$arr=unpack('Cw',$b[$ix]); $value=$arr["w"];
しかし、そのような基本的な操作には過負荷のようです。
生の文字列のバイトにアクセスするより直接的な方法はありますか?
アスキー値:
$b=sha1($k,true); echo ord($b[$ix]);