Hi guys,
I'm trying to load this key (from PHP OpenSSL)
by
gives me
I played arround with other Ciphers but no success. Maybe I'm blind here. Any ideas?
I'm trying to load this key (from PHP OpenSSL)
B4X:
-----BEGIN PUBLIC KEY----- MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAv+1jf5H71+DKLmfbTOJg t5chRSsYD2SS/hu5q8LjiZhgzU9H3KbMcoIKHQrQw5JP1tVjVFoeNRvHxYLuY0m6 mKC+mUjMZcpbwvzvDgU6Py2UABPrlnA2WmpfnlVZxDifxkyV1AhMsLQzo0mmkO48 Jvo4YvpIs5/impp2jUVxjEmI968gCNP8WvZWQJoQA8MReUbckCD40PKzS+y6xtiN fYJD0dEEvar/B8TzkbaZN+KRM4SMIXHrqoMBt2tLQx6SLcxgU8472Jtp6VqK65oX h4A7RqolbncYgxR23v7zmoI3rQWmNDb5KA2oUcH7tAzViFZ8HRnMUQSG2PGF7wC/ YwIDAQAB -----END PUBLIC KEY-----
by
B4X:
c.Initialize("RSA/ECB/PKCS1Padding")
ForeignKPG.Initialize("RSA", 2048)
ForeignPubKeyString=Job.GetString
Log (ForeignPubKeyString)
ForeignPubKeyBytes=Bconv.stringtoBytes(ForeignPubKeyString,"UTF8")
ForeignKPG.publicKeyFromBytes(ForeignPubKeyBytes)
gives me
B4X:
java.security.spec.InvalidKeySpecException: java.lang.RuntimeException: error:0D0680A8:asn1 encoding routines:ASN1_CHECK_TLEN:wrong tag
I played arround with other Ciphers but no success. Maybe I'm blind here. Any ideas?