private static MessageDigest getShaDigest(Algorithm algorithm) {
        switch (algorithm) {
            case SHA256:
                try {
                    return MessageDigest.getInstance("SHA-256");
                } catch (Exception e) {
                    try {
                        return MessageDigest.getInstance("SHA-1");
                    } catch (Exception e2) {
                        return null;
                    }
                }
            case SHA1:
            default:
                try {
                    return MessageDigest.getInstance("SHA-1");
                } catch (Exception e2) {
                    return null;
                }
        }
    }
Gets the default {@link MessageDigest} to use.
Select {@link Algorithm#SHA256} in {@link com.github.omadahealth.lollipin.lib.managers.AppLockImpl#setPasscode(String)}
but can be {@link Algorithm#SHA1} for older versions.

@param algorithm The {@link Algorithm} to use
lib/src/main/java/com/github/omadahealth/lollipin/lib/encryption/Encryptor.java