예제 #1
0
 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);
 }
예제 #2
0
 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));
     }
 }