error keystore.jks commend prompt keytool error: java.security.NoSuchAlgorithmException: RAS KeyPairGenerator not available - keytool

Hi I encountered this error when trying to configure the keystory file for the coin apk file in android studio by commend prompt
C:\Users\deuts>keytool -genkey -alias key0 -v -keystore "C:\Users\deuts\Downloads\keystore.jks" -keyalg RAS -validity 36525
Enter keystore password:
Re-enter new password:
keytool error: java.security.NoSuchAlgorithmException: RAS KeyPairGenerator not available
java.security.NoSuchAlgorithmException: RAS KeyPairGenerator not available
at java.base/java.security.KeyPairGenerator.getInstance(KeyPairGenerator.java:236)
at java.base/sun.security.tools.keytool.CertAndKeyGen.<init>(CertAndKeyGen.java:104)
at java.base/sun.security.tools.keytool.Main.doGenKeyPair(Main.java:1919)
at java.base/sun.security.tools.keytool.Main.doCommands(Main.java:1163)
at java.base/sun.security.tools.keytool.Main.run(Main.java:412)
at java.base/sun.security.tools.keytool.Main.main(Main.java:405)
enter image description here
I searched on Google and did not find anything I came across your site and found that you provide answers I hope to find a solution here

Related

throw PlatformException(code: errorCode, message: errorMessage as String, details: errorDetails, stacktrace: errorStacktrace);

I am getting the error when Selecting on map https://ibb.co/BgsCPnh
Using google_maps_flutter plugin on flutter project
If you get this when you are trying to add google sign-in functionality in your flutter app via using firebase make sure you enable google sign option in authentication
-if yes then try to add SHA1 key in your firebase project
for getting keys
If you are on Mac, open terminal and type the command:
keytool -list -v
-alias androiddebugkey -keystore ~/.android/debug.keystore
If you are on Windows:
keytool -list -v
-alias androiddebugkey -keystore %USERPROFILE%.android\debug.keystore

How to change file java.exe to keytool.exe so i can create signed apk for flutter?

Hi i am currently trying to create a signed apk for a flutter app but I've encounter a problem. Based on official docs https://flutter.dev/docs/deployment/android " Note: The keytool command might not be in your path—it’s part of the Java JDK, which is installed as part of Android Studio. For the concrete path, run flutter doctor -v and locate the path printed after ‘Java binary at:’. Then use that fully qualified path replacing java (at the end) with keytool." and ive check and thats really my situation, now my question is how can i change the location "C:\Program Files\Android\Android Studio\jre\bin\java" to "C:\Program Files\Android\Android Studio\jre\bin\keytool". Thanks for any answer coz i have already search how exactly to do that but failed.
I have found a solution: Simply enter these into Windows command prompt.
italic bold cd C:\Program Files\Java\jdk1.7.0_09\bin
following: How can I find and run the keytool
Yeah Dude I actually solved it my own, I just read the https://flutter.dev/docs/deployment/android again it seams that I didnt change the keytool -genkey -v -keystore c:/Users/USER_NAME/key.jks (<-This is the problem, there is no path on my PC with that name, so just change it) -storetype JKS -keyalg RSA -keysize 2048 -validity 10000 -alias key
To solved this issue:
Use this command keytool -genkey -v -keystore c:/Users/USER_NAME/key.jks -storetype JKS -keyalg RSA -keysize 2048 -validity 10000 -alias key and change the c:/Users/USER_NAME/ with an actual directory.

Keystore file doesn't exist. Unable to get SHA1 key

Unable to get SHA1 key, it is showing error about path, Keystore file doesn't exist.
Tried multiple numbers of solutions,
I am using the following command
keytool -list -v -keystore c:\users\your_user_name\.android\debug.keystore -alias androiddebugkey -storepass android -keypass android
The keystore file does not exists, you have to create it yourself.
Here is the procedure : Generate android release and debug keystores
I had the same problem but I tried below command and interestingly it worked for me under Windows 10.
keytool -list -keystore debug.keystore

Keytool: generate a secret key throws exception

I try to generate a secret key in my *.keystore, but I always get
keytool error: java.io.IOException: Invalid keystore format
java.io.IOException: Invalid keystore format
The command is the following:
keytool -genseckey -keyalg DESede -keysize 168 -v -alias MyTestKey -keystore mykeystore.keystore
storetype: JCEKS
what is wrong?
UPDATE: ok, seems that -storetype jceks helped
is Keytool case sensitive? seems like it is not?
Please check if your keystore is in JKS format. Refer to this link and note case sensitivity.

ANT build: [signjar] enter passphrase for keystore:

I have created a project in eclipse and while trying to build the project from command prompt the following is asked:
[signjar] jarsigner error: java.lang.RuntimeException: keystore load: C:\Documents
and Settings\Gopakumar\.keystore (The system cannot find the file specified)
[signjar] Enter Passphrase for keystore:
BUILD FAILED
D:\Score\build.xml:556: The following error occurred while executing this line:
D:\Score\build.xml:147: jarsigner returned: 1
I have created keystore file using keytool in the project directory, exactly where build.xml resides.
But it doesn't prompt for the passphrase?
Try it:
Make a StoreFile with "keytool" command:
keytool -genkey -keystore YourKeyStoreFileAtPojectDirectory -storepass YourPassStoreString -keyalg rsa -alias YourKeyString -keypass YourPassKeyString -validity 99999 -storepass YourPassStoreString -dname "cn=XXYYZZ, o=XXYYZZ, l=YourCity, S=YourState, c=YourCountry"
and put the signjar block below in your build.xml:
<signjar destDir="signed"
alias="YourKeyString"
keypass="YourPassKeyString"
keystore="YourKeyStoreFileAtPojectDirectory"
storepass="YourPassStoreString"
digestalg="SHA1"
sigalg="MD5withRSA"
>