java - Create a 256 byte RSA encrypted block from a public key -



java - Create a 256 byte RSA encrypted block from a public key -

hello trying write php function/class connect remote (java) server , send message has been encoded 256 byte rsa block using public key.

the github of java server here : https://github.com/vexsoftware/votifier

(search for: protocol documentation).

this how have send data. problem that:

a) public key continuous string.

miibijanbgkqhkig9w0baqefaaocaq8amiibcgkcaqeasdg2qepv74tqowjexu6bcboxtlpxeg/q5p3pkhpn433bstahmbqhroda7qginfqmhvkaofm84mnzckh+ysbriicrw3c7vyarwfgmmqidr/nilds/pmnm2pnpdrpk/vadcwcolsocp6/rjuncmkqv0lw89dtcum5mrptdcksragrp5zoahobjehk6yw2jfpd2cfbpqsu9v7unlkz3znnxwncknkxib6mqa7adfh9j4xa+9ambc5oj/zvfwhnixq3ib4tmdgzsx/+dess2mz0ml78fckxsoft4xbfslggiyi7qsfqzb4fh8d9wuuxadefzntvfy185pginopbjduh8+widaqab

and every function found on net doesnt need.

b) server responds either default message if send wrong info or (i guessing here) ok message when good.

does know how create rsa block ? mean has 256 bytes , got no clue how count bytes php (or doesnt matter ? rsa function me ?)

the public key base64-encoded der-encoded subjectpublickey structure: see rfc5280 details. there php method bas64 decoding, , out there decode result. can convert key openssl rsa phpseclib can work with, example.

java php rsa

Comments

Popular posts from this blog

iphone - Dismissing a UIAlertView -

intellij idea - Update external libraries with intelij and java -

javascript - send data from a new window to previous window in php -