changeset 340:82d127ae1550 ganymed

fix pubkey display; better layout for generate pub keys
author Carl Byington <carl@five-ten-sg.com>
date Thu, 31 Jul 2014 15:53:40 -0700
parents cd1d87edcbf6
children 529883a3a114
files res/layout/act_generatepubkey.xml src/com/five_ten_sg/connectbot/bean/PubkeyBean.java
diffstat 2 files changed, 2 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/res/layout/act_generatepubkey.xml	Thu Jul 31 15:17:31 2014 -0700
+++ b/res/layout/act_generatepubkey.xml	Thu Jul 31 15:53:40 2014 -0700
@@ -66,8 +66,7 @@
 					android:id="@+id/rsa"
 					android:layout_width="wrap_content"
 					android:layout_height="wrap_content"
-					android:text="RSA"
-					android:paddingRight="30dip" />
+					android:text="RSA" />
 
 				<RadioButton
 					android:id="@+id/dsa"
--- a/src/com/five_ten_sg/connectbot/bean/PubkeyBean.java	Thu Jul 31 15:17:31 2014 -0700
+++ b/src/com/five_ten_sg/connectbot/bean/PubkeyBean.java	Thu Jul 31 15:53:40 2014 -0700
@@ -35,12 +35,6 @@
 public class PubkeyBean extends AbstractBean {
     public static final String BEAN_NAME = "pubkey";
 
-    private static final String KEY_TYPE_RSA = "RSA";
-
-    private static final String KEY_TYPE_DSA = "DSA";
-
-    private static final String KEY_TYPE_EC = "EC";
-
     /* Database fields */
     private long id;
     private String nickname;
@@ -167,7 +161,7 @@
             final StringBuilder sb = new StringBuilder();
 
             try {
-                final PublicKey pubKey = PubkeyUtils.decodePublic(privateKey, type);
+                final PublicKey pubKey = PubkeyUtils.decodePublic(publicKey, type);
 
                 if (PubkeyDatabase.KEY_TYPE_RSA.equals(type)) {
                     int bits = ((RSAPublicKey) pubKey).getModulus().bitLength();