<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>评论：真正兼容.net的php 3DES加解密</title>
	<atom:link href="http://www.yibin001.com/archives/6307/feed" rel="self" type="application/rss+xml" />
	<link>http://www.yibin001.com/archives/6307</link>
	<description>面朝大海，春暖花开</description>
	<lastBuildDate>Thu, 11 Mar 2010 01:23:25 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>来自：幻想曲</title>
		<link>http://www.yibin001.com/archives/6307#comment-2418</link>
		<dc:creator>幻想曲</dc:creator>
		<pubDate>Tue, 28 Jul 2009 08:28:20 +0000</pubDate>
		<guid isPermaLink="false">http://www.yibin001.com/?p=6307#comment-2418</guid>
		<description>IV长度为8位</description>
		<content:encoded><![CDATA[<p>IV长度为8位</p>
]]></content:encoded>
	</item>
	<item>
		<title>来自：幻想曲</title>
		<link>http://www.yibin001.com/archives/6307#comment-2417</link>
		<dc:creator>幻想曲</dc:creator>
		<pubDate>Tue, 28 Jul 2009 05:59:02 +0000</pubDate>
		<guid isPermaLink="false">http://www.yibin001.com/?p=6307#comment-2417</guid>
		<description>这个是提示ＩＶ的长度不对，但我这边运行一切正常啊~~~~</description>
		<content:encoded><![CDATA[<p>这个是提示ＩＶ的长度不对，但我这边运行一切正常啊~~~~</p>
]]></content:encoded>
	</item>
	<item>
		<title>来自：afu</title>
		<link>http://www.yibin001.com/archives/6307#comment-2410</link>
		<dc:creator>afu</dc:creator>
		<pubDate>Fri, 24 Jul 2009 07:14:53 +0000</pubDate>
		<guid isPermaLink="false">http://www.yibin001.com/?p=6307#comment-2410</guid>
		<description>幻想曲您好
我使用您提供的key/iv 
abccefg
1234567890as
在我的PHP環境上會得到錯誤

Warning: mcrypt_generic_init() [function.mcrypt-generic-init]: Iv size incorrect; supplied length: 12, needed: 8 in /tripleDES/test.php on line 48

請問要如何解決呢?
謝謝</description>
		<content:encoded><![CDATA[<p>幻想曲您好<br />
我使用您提供的key/iv<br />
abccefg<br />
1234567890as<br />
在我的PHP環境上會得到錯誤</p>
<p>Warning: mcrypt_generic_init() [function.mcrypt-generic-init]: Iv size incorrect; supplied length: 12, needed: 8 in /tripleDES/test.php on line 48</p>
<p>請問要如何解決呢?<br />
謝謝</p>
]]></content:encoded>
	</item>
	<item>
		<title>来自：企鹅</title>
		<link>http://www.yibin001.com/archives/6307#comment-2409</link>
		<dc:creator>企鹅</dc:creator>
		<pubDate>Fri, 24 Jul 2009 00:58:02 +0000</pubDate>
		<guid isPermaLink="false">http://www.yibin001.com/?p=6307#comment-2409</guid>
		<description>&lt;blockquote cite=&quot;#commentbody-2407&quot;&gt;
&lt;strong&gt;&lt;a href=&quot;#comment-2407&quot; rel=&quot;nofollow&quot;&gt;企鹅 &lt;/a&gt; :&lt;/strong&gt;我也是在烦这个问题.想问一下,能不能发一份 C# 端的对应加解密给我? 谢谢.&lt;/blockquote&gt;


谢谢 幻想曲的 邮件.</description>
		<content:encoded><![CDATA[<blockquote cite="#commentbody-2407"><p>
<strong><a href="#comment-2407" rel="nofollow">企鹅 </a> :</strong>我也是在烦这个问题.想问一下,能不能发一份 C# 端的对应加解密给我? 谢谢.</p></blockquote>
<p>谢谢 幻想曲的 邮件.</p>
]]></content:encoded>
	</item>
	<item>
		<title>来自：企鹅</title>
		<link>http://www.yibin001.com/archives/6307#comment-2407</link>
		<dc:creator>企鹅</dc:creator>
		<pubDate>Thu, 23 Jul 2009 03:58:24 +0000</pubDate>
		<guid isPermaLink="false">http://www.yibin001.com/?p=6307#comment-2407</guid>
		<description>我也是在烦这个问题.想问一下,能不能发一份 C# 端的对应加解密给我? 谢谢.</description>
		<content:encoded><![CDATA[<p>我也是在烦这个问题.想问一下,能不能发一份 C# 端的对应加解密给我? 谢谢.</p>
]]></content:encoded>
	</item>
	<item>
		<title>来自：幻想曲</title>
		<link>http://www.yibin001.com/archives/6307#comment-2393</link>
		<dc:creator>幻想曲</dc:creator>
		<pubDate>Fri, 10 Jul 2009 06:02:34 +0000</pubDate>
		<guid isPermaLink="false">http://www.yibin001.com/?p=6307#comment-2393</guid>
		<description>如果要与.net互通的话，最好是.net方提供好密钥与向量。
C#里关于des的GenerateKey()方法我还没有找到在php中的实现。</description>
		<content:encoded><![CDATA[<p>如果要与.net互通的话，最好是.net方提供好密钥与向量。<br />
C#里关于des的GenerateKey()方法我还没有找到在php中的实现。</p>
]]></content:encoded>
	</item>
	<item>
		<title>来自：幻想曲</title>
		<link>http://www.yibin001.com/archives/6307#comment-2392</link>
		<dc:creator>幻想曲</dc:creator>
		<pubDate>Fri, 10 Jul 2009 05:59:38 +0000</pubDate>
		<guid isPermaLink="false">http://www.yibin001.com/?p=6307#comment-2392</guid>
		<description>哦，是这样的。
如果你的加、解密不需要与.net结合的话，key/iv没有特定的要求。
如：
$k =  base64_encode(&#039;abccefg&#039;);
$v =  base64_encode(&#039;12345678&#039;);
echo &#039;$k=&#039;.$k.&#039;&lt;br /&gt;&#039;;
echo &#039;$v=&#039;.$v.&#039;&lt;br /&gt;&#039;;

$des = new Crypt3Des($k,$v);
$ptname = $des-&gt;encrypt(&#039;yibin001&#039;);



echo &#039;$ptname=&#039;.$ptname;

echo &#039;&lt;br /&gt;解密:&#039;.$des-&gt;decrypt($ptname);
exit;

输出为：
$k=YWJjY2VmZw==
$v=MTIzNDU2Nzg5MGFz
$ptname=LZy+S50A8Nza69Y+y4rfEA==
解密:yibin001</description>
		<content:encoded><![CDATA[<p>哦，是这样的。<br />
如果你的加、解密不需要与.net结合的话，key/iv没有特定的要求。<br />
如：<br />
$k =  base64_encode(&#8216;abccefg&#8217;);<br />
$v =  base64_encode(&#8216;12345678&#8242;);<br />
echo &#8216;$k=&#8217;.$k.&#8217;<br />&#8216;;<br />
echo &#8216;$v=&#8217;.$v.&#8217;<br />&#8216;;</p>
<p>$des = new Crypt3Des($k,$v);<br />
$ptname = $des->encrypt(&#8216;yibin001&#8242;);</p>
<p>echo &#8216;$ptname=&#8217;.$ptname;</p>
<p>echo &#8216;<br />解密:&#8217;.$des->decrypt($ptname);<br />
exit;</p>
<p>输出为：<br />
$k=YWJjY2VmZw==<br />
$v=MTIzNDU2Nzg5MGFz<br />
$ptname=LZy+S50A8Nza69Y+y4rfEA==<br />
解密:yibin001</p>
]]></content:encoded>
	</item>
	<item>
		<title>来自：keke</title>
		<link>http://www.yibin001.com/archives/6307#comment-2391</link>
		<dc:creator>keke</dc:creator>
		<pubDate>Fri, 10 Jul 2009 02:31:49 +0000</pubDate>
		<guid isPermaLink="false">http://www.yibin001.com/?p=6307#comment-2391</guid>
		<description>给1楼解释一下……语法高亮把一些方法的下划线弄掉了
传给Crypt3De的key/iv是先base64_encode过的？
另外，key/iv分别有什么特殊要求吗？长度？字符类型或范围？</description>
		<content:encoded><![CDATA[<p>给1楼解释一下……语法高亮把一些方法的下划线弄掉了<br />
传给Crypt3De的key/iv是先base64_encode过的？<br />
另外，key/iv分别有什么特殊要求吗？长度？字符类型或范围？</p>
]]></content:encoded>
	</item>
	<item>
		<title>来自：幻想曲</title>
		<link>http://www.yibin001.com/archives/6307#comment-2329</link>
		<dc:creator>幻想曲</dc:creator>
		<pubDate>Mon, 15 Jun 2009 13:21:14 +0000</pubDate>
		<guid isPermaLink="false">http://www.yibin001.com/?p=6307#comment-2329</guid>
		<description>啥下划线？ :o</description>
		<content:encoded><![CDATA[<p>啥下划线？ <img src='http://www.yibin001.com/wp-includes/images/smilies/icon_surprised.gif' alt=':o' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>来自：zwws</title>
		<link>http://www.yibin001.com/archives/6307#comment-2328</link>
		<dc:creator>zwws</dc:creator>
		<pubDate>Mon, 15 Jun 2009 12:03:11 +0000</pubDate>
		<guid isPermaLink="false">http://www.yibin001.com/?p=6307#comment-2328</guid>
		<description>SyntaxHighlighter把下划线都strip掉了。</description>
		<content:encoded><![CDATA[<p>SyntaxHighlighter把下划线都strip掉了。</p>
]]></content:encoded>
	</item>
</channel>
</rss>
