Package com.exedio.cope.misc
Class DigitPinValidator
- java.lang.Object
-
- com.exedio.cope.pattern.Hash.PlainTextValidator
-
- com.exedio.cope.misc.DigitPinValidator
-
public final class DigitPinValidator extends Hash.PlainTextValidator
Allow only digits as pin, pin len can be specified, reference implementation- Author:
- baumgaertel
-
-
Constructor Summary
Constructors Constructor Description DigitPinValidator(int pinLen)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
newRandomPlainText(SecureRandom secureRandom)
Creates a plain text variant to redeem an existing password (password forgotten).String
toString()
void
validate(String pinString, Item exceptionItem, Hash hash)
-
-
-
Method Detail
-
validate
public void validate(String pinString, Item exceptionItem, Hash hash) throws Hash.InvalidPlainTextException
- Specified by:
validate
in classHash.PlainTextValidator
- Throws:
Hash.InvalidPlainTextException
-
newRandomPlainText
public String newRandomPlainText(SecureRandom secureRandom)
Description copied from class:Hash.PlainTextValidator
Creates a plain text variant to redeem an existing password (password forgotten). The result MUST be valid according toHash.PlainTextValidator.validate(String, Item, Hash)
.- Specified by:
newRandomPlainText
in classHash.PlainTextValidator
-
-