How To Import Crypto.Cipher AES Module Python Policy ?

I am trying to use AES GCM Algorithm to decrypt some data, when I am running this python script on APIGEE

Getting Error → ImportError: No module named Crypto

How can I import this module to Apigee ?

I tried to use command line but it dose not work with me

The Python you can use in a Java callout is actually Jython, which implies it’s an older Python engine and some of the modules available in current Python may not be available in the Jython layer.

Two suggestions for you.

  • use an external callout. This works if you have Apigee X, OR
  • use the AES callout built in Java. Available here.

Good luck!

Thanks very helpful ,

I am tying to use it now but I am facing a problem which is when I specify all properties it gives me Error 500 :

java.lang.IllegalStateException: missing source at com.google.apigee.callouts.AesCryptoCallout.getSourceBytes(AesCryptoCallout.java:331) at com.google.apigee.callouts.AesCryptoCallout.execute(AesCryptoCallout.java:396) at

java.lang.IllegalStateException: missing source

JavaCallOut Body:

decrypt true GCM NoPadding 385f9fd4cba017c159956276036545b0 base16 mRqogt0pxtPdgyjt base64url 73XlhsvhcsaIFJUrqZFyf0Hjgxx9A-rbPWoIdsup-ScsXuqO6RevhNdjBg base64url eyJ0eXAiOiJKV1QiLCJoZHIxIjoxMjMsImVuYyI6IkExMjhHQ00iLCJoZHIyIjp0cnVlLCJhbGciOiJSU0EtT0FFUC0yNTYifQ ESdhCa_eqd2FaI5e5IH2xQ base64url true com.google.apigee.callouts.AesCryptoCallout java://apigee-callout-aes-crypto-20211122a.jar

source must specify the name of a context variable.

Not a hard-coded ciphertext.

To use this callout, you must have a context variable that contains the ciphertext.

Check the README for details and examples.