Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class aws_request {
- public static String bytesToHex(byte[] hash) {
- ...
- return hexString.toString();
- }
- private static byte[] HmacSHA256(String data, byte[] key) throws Exception {
- ...
- return mac.doFinal(data.getBytes("UTF8"));
- }
- private static byte[] getSignatureKey(String key, String dateStamp, String regionName, String serviceName)
- throws Exception {
- ...
- return kSigning;
- }
- public static String getAuthorization() {
- try {...
- return authorization;
- } catch (Exception e) {
- return "failed";
- }
- }
- public static void main(String args[]) {
- vars.put("aaauthorization", getAuthorization());
- }
- }
Add Comment
Please, Sign In to add comment