The best way to sign and verify signature using bouncycastle

shu <[email protected]>
Newsgroups gmane.comp.encryption.bouncy-castle.devel
Message-ID <[email protected]>
Helllo!
I tried to sign and verify signature using bouncycastle from secret key 
file generated by openssl command (using ECDSA).

I used PEMParser and JcaPEMKeyConverter to read key and get KeyPair 
Instance(java.security.KeyPair).
Then, I used java native classes to sign and verify signature (e.g. 
java.security.Signature).

Is this a correct and general way?
Please tell me if there is better and general way.

This is the code.
https://gist.github.com/shu22203/5b2cc0421899670cc4b048229195e814

Greetings
Shu
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.