public static byte[] ToAsc(byte[] pgp) { MemoryStream ms = new MemoryStream(); var ring = new PgpPublicKeyRing(GetStream(pgp)); var armored = new ArmoredOutputStream(ms); ring.Encode(armored); armored.Dispose(); return ms.ToArray(); }
public void Encode( Stream outStr) { BcpgOutputStream bcpgOut = BcpgOutputStream.Wrap(outStr); foreach (long key in order) { PgpPublicKeyRing sec = (PgpPublicKeyRing)pubRings[key]; sec.Encode(bcpgOut); } }
public void Encode(Stream outStr) { BcpgOutputStream outStr2 = BcpgOutputStream.Wrap(outStr); global::System.Collections.IEnumerator enumerator = ((global::System.Collections.IEnumerable)order).GetEnumerator(); try { while (enumerator.MoveNext()) { long num = (long)enumerator.get_Current(); PgpPublicKeyRing pgpPublicKeyRing = (PgpPublicKeyRing)pubRings.get_Item((object)num); pgpPublicKeyRing.Encode((Stream)(object)outStr2); } } finally { global::System.IDisposable disposable = enumerator as global::System.IDisposable; if (disposable != null) { disposable.Dispose(); } } }