def readKmsResponseV4(data, request): response = kmsRequestV4.ResponseV4(data) hashed = kmsRequestV4(data, config).generateHash( bytearray(str(response['response']).encode('latin-1'))) #*2to3* if hashed.decode('latin-1') == response['hash']: logging.info("Response Hash has expected value !!") return response
def readKmsResponseV4(data, request): response = kmsRequestV4.ResponseV4(data) hashed = kmsRequestV4(data, config).generateHash( bytearray(str(response['response']))) logging.info("Response Hash has expected value: ", hashed == response['hash']) return response
def readKmsResponseV4(data): response = kmsRequestV4.ResponseV4(data) hashed = generateHash(bytearray(bytes(response['response']))) print("Response Hash has expected value:", hashed == response['hash']) return response