public void DecodeX509SubjectKeyIdentifierExtension(byte[] encoded, out byte[] subjectKeyIdentifier) { unsafe { subjectKeyIdentifier = encoded.DecodeObject( Oids.SubjectKeyIdentifier, static delegate(void *pvDecoded, int cbDecoded) { Debug.Assert(cbDecoded >= sizeof(CRYPTOAPI_BLOB)); CRYPTOAPI_BLOB *pBlob = (CRYPTOAPI_BLOB *)pvDecoded; return(pBlob->ToByteArray()); }); } }
private static byte[]? DecodeDssKeyValue(byte[] encodedKeyValue) { unsafe { return(encodedKeyValue.DecodeObject( CryptDecodeObjectStructType.X509_DSS_PUBLICKEY, static delegate(void *pvDecoded, int cbDecoded) { Debug.Assert(cbDecoded >= sizeof(CRYPTOAPI_BLOB)); CRYPTOAPI_BLOB *pBlob = (CRYPTOAPI_BLOB *)pvDecoded; return pBlob->ToByteArray(); })); } }
public void DecodeX509SubjectKeyIdentifierExtension(byte[] encoded, out byte[] subjectKeyIdentifier) { unsafe { byte[] localSubjectKeyIdentifier = null; encoded.DecodeObject( Oids.SubjectKeyIdentifier, delegate(void *pvDecoded) { CRYPTOAPI_BLOB *pBlob = (CRYPTOAPI_BLOB *)pvDecoded; localSubjectKeyIdentifier = pBlob->ToByteArray(); } ); subjectKeyIdentifier = localSubjectKeyIdentifier; } }
private static byte[] DecodeDssKeyValue(byte[] encodedKeyValue) { unsafe { byte[] decodedKeyValue = null; encodedKeyValue.DecodeObject( CryptDecodeObjectStructType.X509_DSS_PUBLICKEY, delegate(void *pvDecoded) { CRYPTOAPI_BLOB *pBlob = (CRYPTOAPI_BLOB *)pvDecoded; decodedKeyValue = pBlob->ToByteArray(); } ); return(decodedKeyValue); } }
public static unsafe partial bool CertSetCertificateContextProperty(SafeCertContextHandle pCertContext, CertContextPropId dwPropId, CertSetPropertyFlags dwFlags, CRYPTOAPI_BLOB *pvData);
public static extern unsafe bool CertSetCertificateContextProperty(SafeCertContextHandle pCertContext, CertContextPropId dwPropId, CertSetPropertyFlags dwFlags, [In] CRYPTOAPI_BLOB *pvData);