Python Interview Questions

Showing Questions 1 - 2 of 2 Questions
Sort by: 
 | 
Jump to Page:
  •  

    Encryption with AES/CBC/PKCS5

    AES Encryption using CBC/PKCS5 padding in python while decrypting in java it is given below error

    javax.crypto.BadPaddingException: Decryption error at sun.security.rsa.RSAPadding.unpadV15(Unknown Source) at sun.security.rsa.RSAPadding.unpad(Unknown Source) at com.sun.crypto.provider.RSACipher.doFinal(RSACipher.java:363) at com.sun.crypto.provider.RSACipher.engineDoFinal(RSACipher.java:389)...

  •  

    What is __slots__ and when is it useful?

    Normally, all class objects have an __dict__ which allows new attributes to be bound to a class instance at runtime. When a class is defined with __slots__, only attributes whose names are present in the __slots__ sequence are allowed. This results in instances of this class not having an __dict__ attribute and not being able to bind new attributes at run time.__slots__ is useful because it eliminates...