#NEWLINE# def __getNLKMSecret( self ) : #NEWLINE# #INDENT# logging . debug ( 'Decrypting NL$KM' ) #NEWLINE# value = self . getValue ( '\\Policy\\Secrets\\NL$KM\\CurrVal\\default' ) #NEWLINE# if ( value is None ) : #NEWLINE# #INDENT# raise Exception ( "Couldn't get NL$KM value" ) #NEWLINE# #UNINDENT# if ( self . __vistaStyle is True ) : #NEWLINE# #INDENT# record = LSA_SECRET ( value [ 1 ] ) #NEWLINE# tmpKey = self . __sha256 ( self . __LSAKey , record [ 'EncryptedData' ] [ : 32 ] ) #NEWLINE# self . __NKLMKey = self . __decryptAES ( tmpKey , record [ 'EncryptedData' ] [ 32 : ] ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# self . __NKLMKey = self . __decryptSecret ( self . __LSAKey , value [ 1 ] )