returns the digest of the target string . target is decoded to bytes using the us-ascii charset . supports md5 and sha-1 algorithms . concode_field_sep char[] HEXDIGITS concode_field_sep byte[] toHMacSha256 concode_elem_sep byte[] toHMacSha256 concode_elem_sep String toHttpDigest concode_elem_sep String toMd5 concode_elem_sep String toMd5 concode_elem_sep String toSha1 concode_elem_sep String toSha1 concode_elem_sep byte[] toHMacSha1 concode_elem_sep byte[] toHMacSha1
String function ( String arg0 , String arg1 ) { if ( Digest . ALGORITHM_MD5 . equals ( arg1 ) ) { return toMd5 ( arg0 ) ; } else if ( Digest . ALGORITHM_SHA_1 . equals ( arg1 ) ) { return toSha1 ( arg0 ) ; } throw new IllegalArgumentException ( "srini_string" ) ; }