Layer7 API Management

Expand all | Collapse all

Java to layer 7 - ASCII, MD5,Bytest to HEx

Jump to Best Answer
  • 1.  Java to layer 7 - ASCII, MD5,Bytest to HEx

    Posted 09-05-2017 07:19 AM

    I am working on creating migrating the Java to Layer 7 

     

    String password = “testvalue”;

    string asciiString = ConvertToAsciiValue(password);

    //MD5 encryption MD5CryptoServiceProvider md5service = new MD5CryptoServiceProvider();

    byte[] md5Bytes = md5service.computeHash(System.Text.ASCIIEncoding.UTF8.GetBytes(asciiString));
    String md5String = “”;

    //converting bytes to hex string.

    md5String = bytesToHexString(md5Bytes);

     

    I would like to know how the above steps can be executed in Layer 7 using assertions. 

    If someone can help it would be really helpful 



  • 2.  Re: Java to layer 7 - ASCII, MD5,Bytest to HEx
    Best Answer

    Broadcom Employee
    Posted 09-13-2017 01:29 AM

    Gateway support few types of encoding/encryption, but not exact the same way. If you want to keep the same, we have SDK for you to build your own assertion, Custom Assertions - CA API Gateway - 9.2 - CA Technologies Documentation 



  • 3.  Re: Java to layer 7 - ASCII, MD5,Bytest to HEx

    Posted 09-13-2017 09:29 AM

    Okay Thanks . Can i know whether for converstion of String to ASCII also requires custom assertion or is there a way to do it ? 



  • 4.  Re: Java to layer 7 - ASCII, MD5,Bytest to HEx

    Posted 09-14-2017 05:20 PM

    Have you looked into the Encode/Decode Data assertion? I believe this assertion is the only one we have that will do any kind of character encoding.

    Encode/Decode Data Assertion - CA API Gateway - 9.2 - CA Technologies Documentation 



  • 5.  Re: Java to layer 7 - ASCII, MD5,Bytest to HEx

    Posted 09-15-2017 01:16 PM

    Yup. I did try that and it worked. Thanks a lot for your help on this !