internal void ReopenToDecode() { byte[] message = PkcsUtils.GetMessage(this.m_safeCryptMsgHandle); if (this.m_safeCryptMsgHandle != null && !this.m_safeCryptMsgHandle.IsInvalid) { this.m_safeCryptMsgHandle.Dispose(); } this.m_safeCryptMsgHandle = SignedCms.OpenToDecode(message, this.ContentInfo, this.Detached); }
public byte[] Encode() { if (this.m_safeCryptMsgHandle == null || this.m_safeCryptMsgHandle.IsInvalid) { throw new InvalidOperationException(SecurityResources.GetResourceString("Cryptography_Cms_MessageNotSigned")); } else { return(PkcsUtils.GetMessage(this.m_safeCryptMsgHandle)); } }