use of edu.stanford.bmir.protege.web.shared.auth.Salt in project webprotege by protegeproject.
the class SaltReadConverterTestCase method shouldConvertBase16LowerCaseStringToSalt.
@Test
public void shouldConvertBase16LowerCaseStringToSalt() {
Salt salt = converter.convert(encodedString.toLowerCase());
assertThat(salt.getBytes(), is(bytes));
}
use of edu.stanford.bmir.protege.web.shared.auth.Salt in project webprotege by protegeproject.
the class SaltReadConverter method convert.
@Override
public Salt convert(String s) {
BaseEncoding encoding = BaseEncoding.base16();
byte[] bytes = encoding.decode(s.toUpperCase(Locale.ENGLISH));
return new Salt(bytes);
}
use of edu.stanford.bmir.protege.web.shared.auth.Salt in project webprotege by protegeproject.
the class SaltReadConverterTestCase method shouldConvertBase16UpperCaseStringToSalt.
@Test
public void shouldConvertBase16UpperCaseStringToSalt() {
Salt salt = converter.convert(encodedString.toUpperCase());
assertThat(salt.getBytes(), is(bytes));
}
use of edu.stanford.bmir.protege.web.shared.auth.Salt in project webprotege by protegeproject.
the class UserRecordRepository_TestCase method setUp.
@Before
public void setUp() throws Exception {
client = new MongoClient();
database = client.getDatabase(MongoTestUtils.getTestDbName());
recordRepository = new UserRecordRepository(database, new UserRecordConverter());
userId = UserId.getUserId("JaneDoe");
userRecord = new UserRecord(userId, "Jane Doe", EMAIL_ADDRESS, "", new Salt("somebytes".getBytes()), new SaltedPasswordDigest("someotherbytes".getBytes()));
}
Aggregations