keyrings/cryptfile/cryptfile.py
def _get_mode(mode = None):
        """
        Return the AES mode, or a list of valid AES modes, if mode == None
        """
        from Crypto.Cipher import AES

        AESModeMap = {
            'CCM': AES.MODE_CCM,
            'EAX': AES.MODE_EAX,
            'GCM': AES.MODE_GCM,
            'OCB': AES.MODE_OCB,
        }

        if mode is None:
            return AESModeMap.keys()
        return AESModeMap.get(mode)
def _get_mode(mode = None):
        from Crypto.Cipher import AES

        AESModeMap = {
            'CCM': AES.MODE_CCM,
            'EAX': AES.MODE_EAX,
            'GCM': AES.MODE_GCM,
            'OCB': AES.MODE_OCB,
        }

        if mode is None:
            return AESModeMap.keys()
        return AESModeMap.get(mode)
def _get_mode ( mode = None ) : from Crypto . Cipher import AES AESModeMap = { 'CCM' : AES . MODE_CCM , 'EAX' : AES . MODE_EAX , 'GCM' : AES . MODE_GCM , 'OCB' : AES . MODE_OCB , } if mode is None : return AESModeMap . keys ( ) return AESModeMap . get ( mode )
Return the AES mode, or a list of valid AES modes, if mode == None
Return the AES mode or a list of valid AES modes if mode == None