def DESL(K, D):
 d1 = des(expandDesKey(K[0:7]))
 d2 = des(expandDesKey(K[7:14]))
 d3 = des(expandDesKey((K[14:16] + ('\x00' * 5))))
 return ((d1.encrypt(D) + d2.encrypt(D)) + d3.encrypt(D))

def DESL ( K , D ) : d1 = des ( expandDesKey ( K [ 0 : 7 ] ) ) d2 = des ( expandDesKey ( K [ 7 : 14 ] ) ) d3 = des ( expandDesKey ( ( K [ 14 : 16 ] + ( '\x00' * 5 ) ) ) ) return ( ( d1 . encrypt ( D ) + d2 . encrypt ( D ) ) + d3 . encrypt ( D ) )
references: - URL - [ms-nlmp]: section 6 .