void AnimateCSTE() { CAC.SetupCanvas(); CAC.StartTextStream(); CAC.CacheMode = new BitmapCache(); DoubleAnimation fade_in = new DoubleAnimation(1, TimeSpan.FromMilliseconds(1000)); CAC.BeginAnimation(UIElement.OpacityProperty, fade_in); }
static void Main(string[] args) { var data = "foobar"; var response = CAC.Sign(data); ContentInfo contentInfo = new ContentInfo(Encoding.UTF8.GetBytes("foobar")); //SignedCms signedCms = new SignedCms(contentInfo, true); SignedCms signedCms = new SignedCms(contentInfo, true); signedCms.Decode(Convert.FromBase64String(response.signature)); // This checks if the signature is valid, but doensn't actually verify the cert (TODO) signedCms.CheckSignature(true); signedCms.CheckSignature(false); }