Pkcs12SafeContents.AddSecret(Oid, ReadOnlyMemory<Byte>) 方法
定义
通过新 Pkcs12SecretBag 将具有指定类型标识符的 ASN.1 BER 编码值添加到 SafeContents,返回新创建的包实例。Adds an ASN.1 BER-encoded value with a specified type identifier to the SafeContents via a new Pkcs12SecretBag and returns the newly created bag instance.
public:
System::Security::Cryptography::Pkcs::Pkcs12SecretBag ^ AddSecret(System::Security::Cryptography::Oid ^ secretType, ReadOnlyMemory<System::Byte> secretValue);
public System.Security.Cryptography.Pkcs.Pkcs12SecretBag AddSecret (System.Security.Cryptography.Oid secretType, ReadOnlyMemory<byte> secretValue);
member this.AddSecret : System.Security.Cryptography.Oid * ReadOnlyMemory<byte> -> System.Security.Cryptography.Pkcs.Pkcs12SecretBag
Public Function AddSecret (secretType As Oid, secretValue As ReadOnlyMemory(Of Byte)) As Pkcs12SecretBag
参数
- secretType
- Oid
标识机密值的数据类型的对象标识符 (OID)。The Object Identifier (OID) which identifies the data type of the secret value.
- secretValue
- ReadOnlyMemory<Byte>
表示要添加的机密的 BER 编码值。The BER-encoded value representing the secret to add.
返回
已添加到 SafeContents 的包实例。The bag instance which was added to the SafeContents.
例外
secretType 参数为 null。The secretType parameter is null.
此实例为只读。This instance is read-only.
secretValue 参数不表示单个 ASN.1 BER 编码值。The secretValue parameter does not represent a single ASN.1 BER-encoded value.