public static OmniCertificate Create(OmniDigitalSignature digitalSignature, ReadOnlySequence <byte> sequence) { if (digitalSignature is null) { throw new ArgumentNullException(nameof(digitalSignature)); } ReadOnlyMemory <byte> value; if (digitalSignature.AlgorithmType == OmniDigitalSignatureAlgorithmType.EcDsa_P521_Sha2_256) { value = EcDsa_P521_Sha2_256.Sign(digitalSignature.PrivateKey, sequence); } else { throw new NotSupportedException(nameof(digitalSignature.AlgorithmType)); } return(new OmniCertificate(digitalSignature.Name, digitalSignature.AlgorithmType, digitalSignature.PublicKey, value)); }
public static OmniCertificate CreateOmniCertificate(OmniDigitalSignature digitalSignature, ReadOnlySequence <byte> sequence) { return(OmniCertificate.Create(digitalSignature, sequence)); }