1 7 8 package java.security.spec; 9 10 import java.security.spec.AlgorithmParameterSpec ; 11 12 41 public class MGF1ParameterSpec implements AlgorithmParameterSpec { 42 43 46 public static final MGF1ParameterSpec SHA1 = 47 new MGF1ParameterSpec ("SHA-1"); 48 51 public static final MGF1ParameterSpec SHA256 = 52 new MGF1ParameterSpec ("SHA-256"); 53 56 public static final MGF1ParameterSpec SHA384 = 57 new MGF1ParameterSpec ("SHA-384"); 58 61 public static final MGF1ParameterSpec SHA512 = 62 new MGF1ParameterSpec ("SHA-512"); 63 64 private String mdName; 65 66 74 public MGF1ParameterSpec(String mdName) { 75 if (mdName == null) { 76 throw new NullPointerException ("digest algorithm is null"); 77 } 78 this.mdName = mdName; 79 } 80 81 87 public String getDigestAlgorithm() { 88 return mdName; 89 } 90 } 91 | Popular Tags |