[spring] Using SHA1 and MD5 in MessageDigest. Factory in spring.