public RsaAgentKey(BigInteger modulus, BigInteger exponent, SshAgent agent, byte[] keyData) { KeyData = keyData; Agent = agent; _privateKey = new BigInteger[2]; _privateKey[0] = modulus; _privateKey[1] = exponent; }
public SshRequest GetRequest(SshAgent agent, int requestCode) { if (!_requestMap.ContainsKey(requestCode)) { return(null); } var requestType = _requestMap[requestCode]; var request = Activator.CreateInstance(requestType, agent) as SshRequest; System.Diagnostics.Debug.Assert(request is SshRequest); return(request as SshRequest); }
private void MainWindow_Activated(object sender, EventArgs e) { _sshAgent = new SshAgent(); //var test = new TestHelloService(); //test.ParentHWind = new WindowInteropHelper(GetWindow(this)).Handle; //var input = Encoding.UTF8.GetBytes("This is a test string"); //var data = test.Encrypt(input); //System.Diagnostics.Debug.WriteLine($"encrypted data = {Convert.ToString(data)}"); //var output = test.PromptToDecrypt(data, "Decrypt test data"); //System.Diagnostics.Debug.WriteLine($"Output data = {Encoding.UTF8.GetString(output)}"); }
public PeageantWindow(SshAgent agent) { _wndProcDelegate = PegeantWndProc; // Create WNDCLASS WndClass windClass = new WndClass(); windClass.lpszClassName = CLASS_NAME_PAGEANT; windClass.lpfnWndProc = Marshal.GetFunctionPointerForDelegate(_wndProcDelegate); var classAtom = RegisterClassW(ref windClass); int lastError = Marshal.GetLastWin32Error(); if (classAtom == 0 && lastError != ERROR_CLASS_ALREADY_EXISTS) { throw new Exception("Could not register window class"); } // Create window _hwnd = CreateWindowExW( 0, CLASS_NAME_PAGEANT, CLASS_NAME_PAGEANT, 0, 0, 0, 0, 0, IntPtr.Zero, IntPtr.Zero, IntPtr.Zero, IntPtr.Zero ); _agent = agent; }
public SshRequestAddIdentity(SshAgent agent) : base(SshAgentCode.AddIdentity, agent) { }
internal SshRequest(int requestCode, SshAgent agent) { RequestCode = requestCode; Agent = agent; }
internal SshRequest(SshAgentCode requestCode, SshAgent agent) { RequestCode = (int)requestCode; Agent = agent; }
public RequestIdentities(SshAgent agent) { _agent = agent; }
public EcdsaAgentKey(string curve, byte[] uncompressedCoords, SshAgent agent, byte[] keyData) : base(curve, uncompressedCoords, null) { KeyData = keyData; Agent = agent; }
public ED25519AgentKey(byte[] pk, SshAgent agent, byte[] keyData) : base(pk) { Agent = agent; KeyData = keyData; }
public SshRequestIdentities(SshAgent agent) : base(SshAgentCode.RequestIdentities, agent) { }
public AgentSignature(SshAgent agent, IAgentKey agentKey) { _agent = agent; _agentKey = agentKey; }