echo "Enter BKS output file name : \c"read filenameecho "Enter BKS Password : \c"read BKSPWDecho "Enter P12 or PFX file : \c"read p12Fileif [ ! -f $p12File ]then echo "$p12File file is missing" exit 2fiecho "Enter P12 or PFX password : \c"read p12FilePWDif [ -f "bcprov-jdk15on-152.jar" ]then echo "Please wait ...." keytool -importkeystore -destkeystore $filename.bks -deststoretype BKS -providerpath "bcprov-jdk15on-152.jar" -provider org.bouncycastle.jce.provider.BouncyCastleProvider -deststorepass $BKSPWD -srcstorepass $p12FilePWD -srckeystore $p12File -srcstoretype pkcs12 echo "Pleaes copy the following base64 \n\n" openssl base64 -in $filename.bks -out b64.txt && cat b64.txt rm b64.txt else echo "bcprov-jdk15on-152.jar is missing"fi