コード例 #1
0
        /// <summary><inheritDoc/></summary>
        /// <exception cref="Org.BouncyCastle.Security.GeneralSecurityException"/>
        public virtual byte[] Sign(byte[] message)
        {
            String  algorithm = hashAlgorithm + "with" + encryptionAlgorithm;
            ISigner sig       = SignUtils.GetSignatureHelper(algorithm);

            sig.InitSign(pk);
            sig.Update(message);
            return(sig.GenerateSignature());
        }