He also said that he had taken careful notes of his conversations with Trump in part because he was anxious the president would misrepresent their interactions in the future.
Wednesday, a copy of former FBI Director James Comey's testimony before the Senate Intelligence Committee was released.
Former FBI director James Comey on Thursday accused the Trump administration of defaming him and telling lies about the agency, but declined to offer his opinion on whether USA president Donald Trump sought to obstruct justice by asking him to drop an investigation into the former national security adviser.
During a one-on-one dinner in January, Mr Comey describes an occasion which he says felt like an attempt by the president to exert a position of "patronage".
The person demanded anonymity because the person is not authorized to be named in a discussion about legal strategy.
Comey earlier Thursday accused Trump's administration of defaming him and "telling lies". The two men later agreed that Comey would give "honest loyalty" to Trump, despite Comey admitting later that "it is possible we understood the phrase honest loyalty differently".
Comey's remarks are his first since he was sacked.
When asked by the Senate Intelligence Committee whether the president tried to stop the Russian Federation investigation he was conducting, Mr Comey said: "Not to my understanding, no".
Russia has denied United States intelligence agencies' conclusion announced in January that Russian President Vladimir Putin ordered an effort to help Trump win the 2016 election by discrediting Democratic opponent Hillary Clinton in part through the hacking and disclosure of damaging emails.
Mateja, who served as special counsel to Comey when he was the deputy attorney general, added: "One thing I know about Jim Comey is that he has a phonographic and a photographic memory".
Seen in the kindest light, legal experts say conversations attributed by the fired Federal Bureau of Investigation director to President Donald Trump were clumsy and inappropriate.
After a February 14 meeting on counterterrorism in the Oval Office, Trump dismissed all the participants except Comey, according to the testimony. Comey tells Trump he can be counted on to tell the truth.
If confirmed, Wray will replace James Comey who was sacked by the President last month.