mirror of
https://github.com/hibernate/hibernate-orm
synced 2025-02-28 06:49:09 +00:00
HHH-18892 add test for md5() function
This commit is contained in:
parent
b36ee674ca
commit
5a8db1caa3
@ -2618,6 +2618,13 @@ public void testSha256Function(SessionFactoryScope scope) {
|
||||
catch (NoSuchAlgorithmException e) {
|
||||
throw new RuntimeException( e );
|
||||
}
|
||||
bytes = s.createSelectionQuery("select md5('hello')", byte[].class).getSingleResult();
|
||||
try {
|
||||
assertArrayEquals( MessageDigest.getInstance( "MD5" ).digest("hello".getBytes()), bytes );
|
||||
}
|
||||
catch (NoSuchAlgorithmException e) {
|
||||
throw new RuntimeException( e );
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user