forked from fuel/docs
/
phpseclib.html
98 lines (83 loc) · 3.31 KB
/
phpseclib.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
<!doctype html>
<html lang="ja">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="./../assets/css/combined.css?20190627">
<link rel="shortcut icon" href="./../favicon.ico" />
<script src="https://www.google.com/jsapi" type="text/javascript"></script>
<script type="text/javascript">
var path = './../';
</script>
<script src="./../assets/js/combined.js?20190627"></script>
<title>Vendor additions - PHPSecLib - FuelPHP ドキュメント</title>
</head>
<body>
<div id="container">
<header id="header">
<div class="table">
<div id="cse">
<gcse:searchbox-only newWindow="true"></gcse:searchbox-only>
</div>
<h1>
<a href="https://fuelphp.com"><img height="37px" width="147px" src="./../assets/img/fuel.png" /></a>
<strong>Documentation</strong>
</h1>
</div>
<nav>
<div class="clear"></div>
</nav>
<a href="#" id="toc_handle">目次</a>
<div class="clear"></div>
</header>
<div id="main">
<h2>PHPSecLib</h2>
<h3>はじめに</h3>
<p>
PHP のセキュリティで保護された通信ライブラリは、任意精度の整数の LGPL ライセンスの純粋な PHP の実装が含まれています,
PKCS#1 (v2.1) に帰順した RSA, DES, 3DES, RC4, Rijndael, AES, SSH-1, SSH-2, そして SFTP です。この本はそれらを使用する方法について説明します。
</p>
<h3>ドキュメンテーション</h3>
<p>オリジナルの PHPSecLib ドキュメントは <a href="http://phpseclib.sourceforge.net/documentation/" target="_blank">こちら</a>です。</p>
<h3>FuelPHP の使用</h3>
<p>
PHPSecLib ベンダのパッケージは、安全なハッシュを生成する為に、 Crypt クラスで FuelPHP で使用されています。 PBKDF2 を使用して認証パッケージにされています。
</p>
<h3>アプリケーションの使用状況</h3>
<p>
アプリケーションで使用するため PHPSecLib パッケージは名前空間が付き、オートローダで、使いやすいライブラリになっています。
アプリケーションから直接使用することができます。
</p>
<pre class="php"><code><?php
/**
* SSHログインを行うサンプルコントローラ
*/
class Controller_Ssh extends Controller
{
public function action_index()
{
// connect to my server
$ssh = new \phpseclib\Net\SSH2('myserver.example.org');
// ログイン
if ( ! $ssh->login('username', 'password'))
{
throw new \Exception('ssh login failed');
}
// ディレクトリリストをViewに渡す。
return View::forge('ssh/dirinfo', array(
'pwd' => $ssh->exec('pwd'),
'info' => $ssh->exec('ls -la'),
));
}
}
</code></pre>
</div>
<footer>
<p>
© FuelPHP Development Team 2010-2019 - <a href="http://fuelphp.com">FuelPHP</a> is released under the MIT license.
[ <a href="https://github.com/fuel/docs/commits/1.8/master/vendor/phpseclib.html">原文コミット履歴</a> | <a href="https://github.com/NEKOGET/FuelPHP_docs_jp/commits/1.8/master_japanese/vendor/phpseclib.html">翻訳コミット履歴</a> | <a href="https://github.com/NEKOGET/FuelPHP_docs_jp/blob/1.8/master_japanese/vendor/phpseclib.html">GitHubで修正</a> ]
</p>
</footer>
</div>
</body>
</html>