CASA/c_sharp/NSSSWrapper/RemoteSecret.cs
2005-10-11 19:51:00 +00:00

81 lines
1.5 KiB
C#

using System;
using System.Collections.Specialized;
namespace Novell.SecretStore.NSSSWrapper
{
/// <summary>
/// Summary description for RemoteSecret.
/// </summary>
public class RemoteSecret
{
private string m_sSecretID;
private uint m_iCreateTime = 0;
private uint m_iModifiedTime = 0;
private uint m_iLastAccessTime = 0;
private string m_sValue = null;
private System.Collections.Specialized.NameValueCollection m_nvc;
public RemoteSecret(string sSecretID, uint iCreateTime, uint iModifiedTime, uint iLastAccessTime)
{
if (sSecretID.StartsWith("SS_CredSet:"))
m_sSecretID = sSecretID.Substring(11);
else
m_sSecretID = sSecretID;
m_iCreateTime = iCreateTime;
m_iModifiedTime = iModifiedTime;
m_iLastAccessTime = iLastAccessTime;
if (m_nvc == null)
m_nvc = new NameValueCollection();
}
public string getID()
{
return m_sSecretID;
}
public void setValue(string sValue)
{
m_sValue = sValue;
}
public string getValue()
{
return m_sValue;
}
public uint getCreateTime()
{
return m_iCreateTime;
}
public uint getModifiedTime()
{
return m_iModifiedTime;
}
public uint getAccessTime()
{
return m_iLastAccessTime;
}
public void setKeyValuePair(string sKey, string sValue)
{
m_nvc.Set(sKey, sValue);
}
public NameValueCollection getKeyValueCollection()
{
return m_nvc;
}
public void setKeyValueCollection(NameValueCollection nvc)
{
m_nvc = nvc;
}
}
}