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