How to setup user can not use the last 5 times password in CUBA?

How to setup user can not use the last 5 times password in CUBA ?

Hey!

Implement the logic for storing hashes of the N-last passwords for the User entity. Extend the logic of one of the ways