//Creates PublicKey based on key string private TElPGPPublicKey GetPublicKey(string KeyString) { MemoryStream stream = new MemoryStream(); try { byte[] byteArray = Encoding.ASCII.GetBytes(KeyString); stream = new MemoryStream(byteArray); TElPGPPublicKey Publickey = new TElPGPPublicKey(); Publickey.KeyHashAlgorithm = SBPGPConstants.Unit.SB_PGP_ALGORITHM_MD_AUTO; Publickey.LoadFromStream(stream); return(Publickey); } catch (Exception ex) { Task asyncTask = WriteToLogFileAsync(string.Format("GetPublicKey Error:{0}", ex.Message)); throw ex; } finally { stream.Close(); } }
//Creates PublicKey based on key string private TElPGPPublicKey GetPublicKey(string KeyString) { MemoryStream stream = new MemoryStream(); try { byte[] byteArray = Encoding.ASCII.GetBytes(KeyString); stream = new MemoryStream(byteArray); TElPGPPublicKey Publickey = new TElPGPPublicKey(); Publickey.KeyHashAlgorithm = SBPGPConstants.Unit.SB_PGP_ALGORITHM_MD_AUTO; Publickey.LoadFromStream(stream); return(Publickey); } catch (Exception ex) { throw ex; } finally { stream.Close(); } }
public PGPPublicKey( ) { Key = new TElPGPPublicKey(); }
public PGPPublicKey(TElPGPPublicKey key) { Key = key; }