如何创建ASN1编码对象 [英] How to create ASN1 Encoded object

查看:207
本文介绍了如何创建ASN1编码对象的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用CNG和cryptoAPI生成rawsignature和证书字节数组

Hi, i am having rawsignature and certificate byte array generated using CNG and cryptoAPI

现在我想创建一个ASN1 Encoded对象,其中包含一些类似内容类型的数据,签名时间,消息摘要和八位字符串。

Now i want to create an ASN1 Encoded object with some oid's like content type,data, signing time, message digest and octect string.

谁能告诉我在cryptoAPI或CNG中是否有任何ASN1编码类API?或者怎么做?

Can anyone tell me is there any ASN1 Encoded class API in cryptoAPI or CNG? or how to do this?

我试图在
System.Security.Cryptography
 但未成功。

I tried to use AsnEncodedData Class at System.Security.Cryptography but not succeded.

提前致谢。

推荐答案

Anil Kumar Guduru写道:

Anil Kumar Guduru wrote:


我正在生成rawsignature和证书字节数组 使用CNG和cryptoAPI



现在我想创建一个带有一些oid的ASN1编码对象,例如 内容类型,数据,签名时间,消息摘要和八位字节

字符串。



任何人都可以告诉我在cryptoAPI中是否有任何ASN1编码类API或  CNG?或者怎么做?

Hi, i am having rawsignature and certificate byte array generated  using CNG and cryptoAPI

Now i want to create an ASN1 Encoded object with some oid's like  content type,data, signing time, message digest and octect
string.

Can anyone tell me is there any ASN1 Encoded class API in cryptoAPI or  CNG? or how to do this?

CryptoAPI无法对任意对象执行ASN1编码。它只是 知道如何编码某些加密中使用的特定数据结构 操作 - 例如各种PKCS标准中规定的那些。见  CryptEncodeObject。

CryptoAPI can't perform ASN1 encoding of arbitrary objects. It only  knows how to encode specific data structures used in certain crypto  operations - e.g. those specified in various PKCS standards. See  CryptEncodeObject.

如果要创建PKCS消息,请参阅

If you want to create a PKCS message, see

http://msdn.microsoft.com/en-us/library/windows/desktop/aa387404.aspx

http://msdn.microsoft.com/en -us / library / windows / desktop / aa379861.aspx

我不熟悉CNG。


这篇关于如何创建ASN1编码对象的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆