/// <summary> /// 根据传入的账户信息,对可签名的对象进行签名 /// </summary> /// <param name="signable">要签名的数据</param> /// <param name="account">用于签名的账户</param> /// <returns>返回签名后的结果</returns> public static byte[] Sign(this ISignable signable, Account account) { using (account.Decrypt()) { return(signable.Sign(account.PrivateKey, account.PublicKey.EncodePoint(false).Skip(1).ToArray())); } }
public void SignSignable(ISignable signable) => signable.Sign();