comparison app/src/main/java/ch/ethz/ssh2/AuthAgentCallback.java @ 438:d29cce60f393

migrate from Eclipse to Android Studio
author Carl Byington <carl@five-ten-sg.com>
date Thu, 03 Dec 2015 11:23:55 -0800
parents src/ch/ethz/ssh2/AuthAgentCallback.java@ab3a99f11a36
children
comparison
equal deleted inserted replaced
437:208b31032318 438:d29cce60f393
1 package ch.ethz.ssh2;
2
3 import java.security.KeyPair;
4 import java.util.Map;
5
6 /**
7 * AuthAgentCallback.
8 *
9 * @author Kenny Root
10 * @version $Id$
11 */
12 public interface AuthAgentCallback {
13
14 /**
15 * @return array of blobs containing the OpenSSH-format encoded public keys
16 */
17 Map<String, byte[]> retrieveIdentities();
18
19 /**
20 * @param pair A <code>RSAPrivateKey</code> or <code>DSAPrivateKey</code> or <code>ECPrivateKey</code>
21 * containing a DSA or RSA or EC private key of
22 * the user in standard java key format.
23 * @param comment comment associated with this key
24 * @param confirmUse whether to prompt before using this key
25 * @param lifetime lifetime in seconds for key to be remembered
26 * @return success or failure
27 */
28 boolean addIdentity(KeyPair pair, String comment, boolean confirmUse, int lifetime);
29
30 /**
31 * @param publicKey byte blob containing the OpenSSH-format encoded public key
32 * @return success or failure
33 */
34 boolean removeIdentity(byte[] publicKey);
35
36 /**
37 * @return success or failure
38 */
39 boolean removeAllIdentities();
40
41 /**
42 * @param publicKey byte blob containing the OpenSSH-format encoded public key
43 * @return A <code>RSAPrivateKey</code> or <code>DSAPrivateKey</code>
44 * containing a DSA or RSA or EC private key of
45 * the user in standard java key format.
46 */
47 KeyPair getKeyPair(byte[] publicKey);
48
49 /**
50 * @return
51 */
52 boolean isAgentLocked();
53
54 /**
55 * @param lockPassphrase
56 */
57 boolean setAgentLock(String lockPassphrase);
58
59 /**
60 * @param unlockPassphrase
61 * @return
62 */
63 boolean requestAgentUnlock(String unlockPassphrase);
64 }