Guest User

Untitled

a guest
May 24th, 2018
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.65 KB | None | 0 0
  1. class aws_request {
  2.  
  3. public static String bytesToHex(byte[] hash) {
  4. ...
  5. return hexString.toString();
  6. }
  7.  
  8. private static byte[] HmacSHA256(String data, byte[] key) throws Exception {
  9. ...
  10. return mac.doFinal(data.getBytes("UTF8"));
  11. }
  12.  
  13. private static byte[] getSignatureKey(String key, String dateStamp, String regionName, String serviceName)
  14. throws Exception {
  15. ...
  16. return kSigning;
  17. }
  18.  
  19. public static String getAuthorization() {
  20. try {...
  21. return authorization;
  22. } catch (Exception e) {
  23. return "failed";
  24. }
  25.  
  26. }
  27. public static void main(String args[]) {
  28. vars.put("aaauthorization", getAuthorization());
  29. }
  30. }
Add Comment
Please, Sign In to add comment