mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-11 07:55:47 +01:00
added compatibility test
This commit is contained in:
@@ -31,6 +31,12 @@
|
|||||||
|
|
||||||
package sonia.scm.security;
|
package sonia.scm.security;
|
||||||
|
|
||||||
|
//~--- non-JDK imports --------------------------------------------------------
|
||||||
|
|
||||||
|
import org.junit.Test;
|
||||||
|
|
||||||
|
import static org.junit.Assert.*;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @author Sebastian Sdorra
|
* @author Sebastian Sdorra
|
||||||
@@ -49,4 +55,18 @@ public class SHA1HashBuilderTest extends HashBuilderTestBase
|
|||||||
{
|
{
|
||||||
return new SHA1HashBuilder();
|
return new SHA1HashBuilder();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Method description
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void testCompatibility()
|
||||||
|
{
|
||||||
|
MessageDigestEncryptionHandler mdeh = new MessageDigestEncryptionHandler();
|
||||||
|
String hash = mdeh.encrypt("trillian123");
|
||||||
|
String newHash = createHashBuilder().setValue("trillian123").toHexString();
|
||||||
|
|
||||||
|
assertEquals(hash, newHash);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user