@Test public void testEncrypt() throws Throwable { String expected = "4cd5bed8e904fd9fe005a7099e0bf3abe02884b7c04886b69beddb8d778d4216"; String input = "heri"; String actual; myLog.info( "encrypting password " + input ); actual = myClassUnderTest.encrypt( input ); myLog.debug( "Received: " + actual ); myLog.debug( "Expected: " + expected ); Assert.assertEquals( expected, actual ); }
@Override public String encrypt( String aPassword ) { String salt = myEnv.getRequiredProperty( OxTargetConfiguration.KEY_PW_SALT ); String hash = DigestUtils.sha256Hex( salt + aPassword ); myLog.debug( "hashed password: " + hash ); return new String( hash ); }
OxPasswordEncryptor implements ch.sdi.core.intf.PasswordEncryptor { @Override public String encrypt( String aPassword ) { String salt = myEnv.getRequiredProperty( OxTargetConfiguration.KEY_PW_SALT ); String hash = DigestUtils.sha256Hex( salt + aPassword ); myLog.debug( "hashed password: " + hash ); return new String( hash ); } }
OxPasswordEncryptor implements ch.sdi.core.intf.PasswordEncryptor { @Override public String encrypt( String aPassword ) { String salt = myEnv.getRequiredProperty( OxTargetConfiguration.KEY_PW_SALT ); String hash = DigestUtils.sha256Hex( salt + aPassword ); myLog.debug( "hashed password: " + hash ); return new String( hash ); }  }
OxPasswordEncryptor implements ch.sdi.core.intf.PasswordEncryptor { @Override public String encrypt( String aPassword ) { String salt = myEnv.getRequiredProperty( OxTargetConfiguration.KEY_PW_SALT ); String hash = DigestUtils.sha256Hex( salt + aPassword ); myLog.debug( "hashed password: " + hash ); return new String( hash ); }  @Override String encrypt( String aPassword ); }
OxPasswordEncryptor implements ch.sdi.core.intf.PasswordEncryptor { @Override public String encrypt( String aPassword ) { String salt = myEnv.getRequiredProperty( OxTargetConfiguration.KEY_PW_SALT ); String hash = DigestUtils.sha256Hex( salt + aPassword ); myLog.debug( "hashed password: " + hash ); return new String( hash ); }  @Override String encrypt( String aPassword );  }