// Create a signature for a specified hash value. public override byte[] CreateSignature(byte[] rgbHash) { if (keyContainer == null) { throw new CryptographicException (_("Crypto_MissingKey")); } return(keyContainer.CreateSignature(rgbHash)); }
public override byte[] CreateSignature(byte[] rgbHash) { if (dsa == null) { throw new CryptographicUnexpectedOperationException( Locale.GetText("missing key")); } return(dsa.CreateSignature(rgbHash)); }
public override Signature Sign(byte[] data) { //Synchronize around the hash algorithm to prevent collisions. lock (hashAlgorithm) { //Initialize the hash algorithm. hashAlgorithm.Initialize(); //Sign the data, providing the identity of the signer and the original data. return(new DSASignature(data, identity, dsa.CreateSignature(hashAlgorithm.ComputeHash(data)))); } }
public override byte[] CreateSignature(byte[] rgbHash) { if (rgbHash == null) { throw new ArgumentNullException(nameof(rgbHash)); } if (_dsaKey == null) { throw new CryptographicUnexpectedOperationException(SR.Cryptography_MissingKey); } return(_dsaKey.CreateSignature(rgbHash)); }
public override byte[] CreateSignature(byte[] rgbHash) { if (rgbHash == null) { throw new ArgumentNullException("rgbHash"); } Contract.EndContractBlock(); if (_oid == null) { throw new CryptographicUnexpectedOperationException(Environment.GetResourceString("Cryptography_MissingOID")); } if (_dsaKey == null) { throw new CryptographicUnexpectedOperationException(Environment.GetResourceString("Cryptography_MissingKey")); } return(_dsaKey.CreateSignature(rgbHash)); }
/// <include file='doc\DSASignatureFormatter.uex' path='docs/doc[@for="DSASignatureFormatter.CreateSignature"]/*' /> public override byte[] CreateSignature(byte[] rgbHash) { byte[] rgbSig; if (_strOID == null) { throw new CryptographicUnexpectedOperationException(Environment.GetResourceString("Cryptography_MissingOID")); } if (_dsaKey == null) { throw new CryptographicUnexpectedOperationException(Environment.GetResourceString("Cryptography_MissingKey")); } if (rgbHash == null) { throw new ArgumentNullException("rgbHash"); } rgbSig = _dsaKey.CreateSignature(rgbHash); return(rgbSig); }
public override byte[] CreateSignature(byte[] rgbHash) => _impl.CreateSignature(rgbHash);
public override byte[] CreateSignature(byte[] rgbHash) => _wrapped.CreateSignature(rgbHash);