<?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>Comments on: Using RSA-SHA1 with Salesforce Crypto Class</title>
	<atom:link href="http://blog.jeffdouglas.com/2010/07/06/using-rsa-sha1-with-salesforce-crypto-class/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.jeffdouglas.com/2010/07/06/using-rsa-sha1-with-salesforce-crypto-class/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=using-rsa-sha1-with-salesforce-crypto-class</link>
	<description>Get your head out of your #@! and into the clouds!</description>
	<lastBuildDate>Wed, 08 Feb 2012 07:57:55 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=</generator>
	<item>
		<title>By: Muhammad</title>
		<link>http://blog.jeffdouglas.com/2010/07/06/using-rsa-sha1-with-salesforce-crypto-class/comment-page-1/#comment-4698</link>
		<dc:creator>Muhammad</dc:creator>
		<pubDate>Thu, 15 Sep 2011 18:52:43 +0000</pubDate>
		<guid isPermaLink="false">http://blog.jeffdouglas.com/?p=2754#comment-4698</guid>
		<description>Hi jeff,
i am very surprise to see that why you are doing encryption with private key, can we done this, usually we done encryption with public key and do decryption with private key. Please replay to this comment</description>
		<content:encoded><![CDATA[<p>Hi jeff,<br />
i am very surprise to see that why you are doing encryption with private key, can we done this, usually we done encryption with public key and do decryption with private key. Please replay to this comment</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: SACHIN AGARWAL</title>
		<link>http://blog.jeffdouglas.com/2010/07/06/using-rsa-sha1-with-salesforce-crypto-class/comment-page-1/#comment-4182</link>
		<dc:creator>SACHIN AGARWAL</dc:creator>
		<pubDate>Thu, 09 Jun 2011 17:38:15 +0000</pubDate>
		<guid isPermaLink="false">http://blog.jeffdouglas.com/?p=2754#comment-4182</guid>
		<description>Hi Jeff,
Thanks for the blogs.


Have you ever tried to encrypte data &amp; put that encrypted data in cookies on one page &amp; try to encrypte that data into other page from cookies in salesforce apex class.</description>
		<content:encoded><![CDATA[<p>Hi Jeff,<br />
Thanks for the blogs.</p>
<p>Have you ever tried to encrypte data &amp; put that encrypted data in cookies on one page &amp; try to encrypte that data into other page from cookies in salesforce apex class.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: AB</title>
		<link>http://blog.jeffdouglas.com/2010/07/06/using-rsa-sha1-with-salesforce-crypto-class/comment-page-1/#comment-2435</link>
		<dc:creator>AB</dc:creator>
		<pubDate>Sat, 15 Jan 2011 23:26:21 +0000</pubDate>
		<guid isPermaLink="false">http://blog.jeffdouglas.com/?p=2754#comment-2435</guid>
		<description>By the way I am enjoying your blog very much thank you for your sharing passion!I just started my own company and I appreciate your work...see my work at www.epowerbilling.com</description>
		<content:encoded><![CDATA[<p>By the way I am enjoying your blog very much thank you for your sharing passion!I just started my own company and I appreciate your work&#8230;see my work at <a href="http://www.epowerbilling.com" rel="nofollow">http://www.epowerbilling.com</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: AB</title>
		<link>http://blog.jeffdouglas.com/2010/07/06/using-rsa-sha1-with-salesforce-crypto-class/comment-page-1/#comment-2434</link>
		<dc:creator>AB</dc:creator>
		<pubDate>Sat, 15 Jan 2011 23:18:22 +0000</pubDate>
		<guid isPermaLink="false">http://blog.jeffdouglas.com/?p=2754#comment-2434</guid>
		<description>Hi Jeff,

Very important, the error from salesforce is misleading the third argument is not of type &quot;string&quot; but &quot;Blob&quot; so the solution is :
public class cryptotest
{
   private String getMac(String RequestString, String secretkey) {
        String algorithmName = &#039;hmacSHA1&#039;; //&#039;RSA&#039;;
        Blob input = Blob.valueOf(RequestString);
        Blob key = Blob.valueOf(secretkey);
        Blob signing =Crypto.generateMac(algorithmName, input, key);  
        return EncodingUtil.urlEncode(EncodingUtil.base64Encode(signing), &#039;UTF-8&#039;);
        //return &#039;&#039;;
    } 
}</description>
		<content:encoded><![CDATA[<p>Hi Jeff,</p>
<p>Very important, the error from salesforce is misleading the third argument is not of type &#8220;string&#8221; but &#8220;Blob&#8221; so the solution is :<br />
public class cryptotest<br />
{<br />
   private String getMac(String RequestString, String secretkey) {<br />
        String algorithmName = &#8216;hmacSHA1&#8242;; //&#8217;RSA&#8217;;<br />
        Blob input = Blob.valueOf(RequestString);<br />
        Blob key = Blob.valueOf(secretkey);<br />
        Blob signing =Crypto.generateMac(algorithmName, input, key);<br />
        return EncodingUtil.urlEncode(EncodingUtil.base64Encode(signing), &#8216;UTF-8&#8242;);<br />
        //return &#8221;;<br />
    }<br />
}</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: AB</title>
		<link>http://blog.jeffdouglas.com/2010/07/06/using-rsa-sha1-with-salesforce-crypto-class/comment-page-1/#comment-2433</link>
		<dc:creator>AB</dc:creator>
		<pubDate>Sat, 15 Jan 2011 23:05:34 +0000</pubDate>
		<guid isPermaLink="false">http://blog.jeffdouglas.com/?p=2754#comment-2433</guid>
		<description>It&#039;s 20 and same error msg</description>
		<content:encoded><![CDATA[<p>It&#8217;s 20 and same error msg</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jeff Douglas</title>
		<link>http://blog.jeffdouglas.com/2010/07/06/using-rsa-sha1-with-salesforce-crypto-class/comment-page-1/#comment-2432</link>
		<dc:creator>Jeff Douglas</dc:creator>
		<pubDate>Sat, 15 Jan 2011 22:43:45 +0000</pubDate>
		<guid isPermaLink="false">http://blog.jeffdouglas.com/?p=2754#comment-2432</guid>
		<description>@AB, check the API version of your class. I may be using an older version and you need to update to 19 or 20.</description>
		<content:encoded><![CDATA[<p>@AB, check the API version of your class. I may be using an older version and you need to update to 19 or 20.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: AB</title>
		<link>http://blog.jeffdouglas.com/2010/07/06/using-rsa-sha1-with-salesforce-crypto-class/comment-page-1/#comment-2431</link>
		<dc:creator>AB</dc:creator>
		<pubDate>Sat, 15 Jan 2011 22:09:55 +0000</pubDate>
		<guid isPermaLink="false">http://blog.jeffdouglas.com/?p=2754#comment-2431</guid>
		<description>public class cryptotest
{
   private String getMac(String RequestString, String secretkey) {
        String algorithmName = &#039;hmacSHA1&#039;; //&#039;RSA&#039;;
        Blob input = Blob.valueOf(RequestString);
        Blob signing =Crypto.generateMac(algorithmName, input, secretkey);  
        return EncodingUtil.urlEncode(EncodingUtil.base64Encode(signing), &#039;UTF-8&#039;);
        //return &#039;&#039;;
    } 
}

I wrote this litte class in my sandbox and I am getting a very annoying error &quot;Error: Compile Error: Method does not exist or incorrect signature: Crypto.generateMac(String, Blob, String) at line 6 column 23	
&quot; can you help ?

Thanks</description>
		<content:encoded><![CDATA[<p>public class cryptotest<br />
{<br />
   private String getMac(String RequestString, String secretkey) {<br />
        String algorithmName = &#8216;hmacSHA1&#8242;; //&#8217;RSA&#8217;;<br />
        Blob input = Blob.valueOf(RequestString);<br />
        Blob signing =Crypto.generateMac(algorithmName, input, secretkey);<br />
        return EncodingUtil.urlEncode(EncodingUtil.base64Encode(signing), &#8216;UTF-8&#8242;);<br />
        //return &#8221;;<br />
    }<br />
}</p>
<p>I wrote this litte class in my sandbox and I am getting a very annoying error &#8220;Error: Compile Error: Method does not exist or incorrect signature: Crypto.generateMac(String, Blob, String) at line 6 column 23<br />
&#8221; can you help ?</p>
<p>Thanks</p>
]]></content:encoded>
	</item>
</channel>
</rss>

