protected MessageDigest(String algorithm){
  this.algorithm=algorithm;
}

protected MessageDigest ( String algorithm ) { this . algorithm = algorithm ; }
creates a message digest with the specified algorithm name .
