{"id":3273,"date":"2014-03-21T18:57:42","date_gmt":"2014-03-21T18:57:42","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2014\/03\/21\/java-base64-encode-with-amazon-services-collection-of-common-programming-errors-2\/"},"modified":"2014-03-21T18:57:42","modified_gmt":"2014-03-21T18:57:42","slug":"java-base64-encode-with-amazon-services-collection-of-common-programming-errors-2","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2014\/03\/21\/java-base64-encode-with-amazon-services-collection-of-common-programming-errors-2\/","title":{"rendered":"Java Base64 Encode with Amazon Services-Collection of common programming errors"},"content":{"rendered":"<p>I am using exact code from here:<br \/>\nhttp:\/\/docs.amazonwebservices.com\/AWSSimpleQueueService\/latest\/SQSDeveloperGuide\/AuthJavaSampleHMACSignature.html<\/p>\n<p>to generate a signature for my application. However, one line of code is not recognized in Eclipse<\/p>\n<pre><code>result = Encoding.EncodeBase64(rawHmac);\n<\/code><\/pre>\n<p>Eclipse is saying it does not recognize the &#8220;Encoding&#8221; class. This is the exact error: The method EncodeBase64(byte[]) is undefined for the type Encoding<\/p>\n<p>I&#8217;ve tried importing the following 3 things:<\/p>\n<pre><code>javax.sound.sampled.AudioFormat.Encoding;\norg.apache.commons.codec.binary.Base64;\norg.omg.IOP.Encoding;\n<\/code><\/pre>\n<p>However all three of these then tell me they don&#8217;t recognize the &#8216;EncodeBase64&#8217; function. Does anybody know what import im supposed to use for the code linked above?<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I am using exact code from here: http:\/\/docs.amazonwebservices.com\/AWSSimpleQueueService\/latest\/SQSDeveloperGuide\/AuthJavaSampleHMACSignature.html to generate a signature for my application. However, one line of code is not recognized in Eclipse result = Encoding.EncodeBase64(rawHmac); Eclipse is saying it does not recognize the &#8220;Encoding&#8221; class. This is the exact error: The method EncodeBase64(byte[]) is undefined for the type Encoding I&#8217;ve tried importing [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-3273","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/3273","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/comments?post=3273"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/3273\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=3273"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=3273"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=3273"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}