def dataDecrypt(edata, password, keyLength=32):
 if (not edata.startswith(CryptoMarker.encode())):
  return (edata, False)
 from .py3AES import decryptData
 from .py3PBKDF2 import rehashPassword
 (hashParametersBytes, edata) = edata[3:].rsplit(Delimiter.encode(), 1)
 hashParameters = hashParametersBytes.decode()
 try:
  key = rehashPassword(password, hashParameters)[:keyLength]
  plaintext = decryptData(key, base64.b64decode(edata))
 except ValueError:
  return (u'', False)
 return (plaintext, True)

def dataDecrypt ( edata , password , keyLength = 32 ) : if ( not edata . startswith ( CryptoMarker . encode ( ) ) ) : return ( edata , False ) from . py3AES import decryptData from . py3PBKDF2 import rehashPassword ( hashParametersBytes , edata ) = edata [ 3 : ] . rsplit ( Delimiter . encode ( ) , 1 ) hashParameters = hashParametersBytes . decode ( ) try : key = rehashPassword ( password , hashParameters ) [ : keyLength ] plaintext = decryptData ( key , base64 . b64decode ( edata ) ) except ValueError : return ( u'' , False ) return ( plaintext , True )
module function to decrypt a password .