@Test
    void verifySha() {
        assertNotNull(DigestUtils.sha("HelloWorld".getBytes(StandardCharsets.UTF_8)));
        assertNotNull(DigestUtils.shaBase64("salt", "HelloWorld"));
        assertNotNull(DigestUtils.shaBase64("salt", "HelloWorld", ";", true));
        assertNotNull(DigestUtils.shaBase32("salt", "HelloWorld", ";", true));
        assertNotNull(DigestUtils.shaBase64("salt", "HelloWorld", ";"));
        assertThrows(SecurityException.class, () -> DigestUtils.rawDigestSha256(null));
        assertThrows(SecurityException.class, () -> DigestUtils.rawDigest(null, ArrayUtils.EMPTY_BYTE_ARRAY));
        assertThrows(SecurityException.class, () -> DigestUtils.rawDigest(null, null, ArrayUtils.EMPTY_STRING_ARRAY));
    }
This is {@link DigestUtilsTests}.

@author Misagh Moayyed
@since 6.3.0
core/cas-server-core-util-api/src/test/java/org/apereo/cas/util/DigestUtilsTests.java