DataPower

DataPower

Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.

 View Only
  • 1.  digestmode=hashlib.sha256

    Posted Wed January 19, 2022 01:21 PM

    Dears,

    how to use below in datapower:

    import hmac

    import hashlib

    import base64

    username = input("Enter username : ")

    client_id = '123456789'

    client_secret = '12345678946513'

    dig = hmac.new(client_secret, msg=(username + client_id).encode('UTF-8'),

    digestmod=hashlib.sha256).digest()

    print("Your secret hash is : '" + base64.b64encode(dig).decode() + "'")



    #DataPower
    #Support
    #SupportMigration


  • 2.  RE: digestmode=hashlib.sha256

    Posted Wed January 19, 2022 02:14 PM

    Hi.

    I think you have to use crypto module:

    https://www.ibm.com/docs/en/datapower-gateways/10.0.1?topic=apis-crypto-module

    https://www.ibm.com/docs/en/datapower-gateways/10.0.1?topic=apis-crypto-module#crypto.createHmac

    --HP



    #DataPower
    #Support
    #SupportMigration