public static String sign2(String buf,SecretKey key,String algorithm){
  return sign2(buf.getBytes(),key,algorithm);
}

public static String sign2 ( String buf , SecretKey key , String algorithm ) { return sign2 ( buf . getBytes ( ) , key , algorithm ) ; }
sign the contents of string . with the specified key and algorithm
