public static TPMKeyParamsCore Create(TPMAlgorithmId algorithmId, TPMEncScheme encScheme, TPMSigScheme sigScheme, ITPMAlgorithmSpecificKeyParams algorithmKeyParams) { if (algorithmId == TPMAlgorithmId.TPM_ALG_RSA && !(algorithmKeyParams is TPMRSAKeyParamsCore)) throw new ArgumentException (string.Format ("algorithm: {0} required TPMRSAKeyParamsCore", algorithmId)); TPMKeyParamsCore keyParamsCore = new TPMKeyParamsCore (); keyParamsCore._algorithmId = algorithmId; keyParamsCore._encScheme = encScheme; keyParamsCore._sigScheme = sigScheme; keyParamsCore._params = algorithmKeyParams; return keyParamsCore; }
public static TPMKeyParamsCore Create(TPMAlgorithmId algorithmId, TPMEncScheme encScheme, TPMSigScheme sigScheme, ITPMAlgorithmSpecificKeyParams algorithmKeyParams) { if (algorithmId == TPMAlgorithmId.TPM_ALG_RSA && !(algorithmKeyParams is TPMRSAKeyParamsCore)) { throw new ArgumentException(string.Format("algorithm: {0} required TPMRSAKeyParamsCore", algorithmId)); } TPMKeyParamsCore keyParamsCore = new TPMKeyParamsCore(); keyParamsCore._algorithmId = algorithmId; keyParamsCore._encScheme = encScheme; keyParamsCore._sigScheme = sigScheme; keyParamsCore._params = algorithmKeyParams; return(keyParamsCore); }