Java Base64 Encode with Amazon Services-Collection of common programming errors
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 “Encoding” class. This is the exact error: The method EncodeBase64(byte[]) is undefined for the type Encoding
I’ve tried importing the following 3 things:
javax.sound.sampled.AudioFormat.Encoding;
org.apache.commons.codec.binary.Base64;
org.omg.IOP.Encoding;
However all three of these then tell me they don’t recognize the ‘EncodeBase64’ function. Does anybody know what import im supposed to use for the code linked above?