Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion KeyChain.getPrivateKey(Context ,String) on Android 4.1?
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Meidey  
View profile  
 More options Sep 20 2012, 3:24 am
From: Meidey <toms.med...@gmail.com>
Date: Thu, 20 Sep 2012 00:24:18 -0700 (PDT)
Local: Thurs, Sep 20 2012 3:24 am
Subject: KeyChain.getPrivateKey(Context,String) on Android 4.1?

I read that there is problem method KeyChain.getPrivateKey(Context,String)
on Android 4.1 although on older versions it works. Does anybody has
solution how to get private key on JellyBean?

Code that does not work on 4.1, but works great on older versions.

PrivateKey pk;

try {
    pk = KeyChain.getPrivateKey(context,string);
    byte[] pkByte = pk.getEncoded();
    pkBase64 = new String(Base64.encode(pkByte, Base64.NO_WRAP));

}


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.