code: public static byte[] rawDigest(final String alg, final byte[] data) {
          try {
              val digest = getMessageDigestInstance(alg);
              return digest.digest(data);
          } catch (final Exception cause) {
              throw new SecurityException(cause);
          }
      }
docs: Computes digest.
  
  @param alg  Digest algorithm to use
  @param data data to be hashed
  @return hash