Zum Inhalt springen

bright

Mitglieder
  • Gesamte Inhalte

    1
  • Benutzer seit

  • Letzter Besuch

Alle Inhalte von bright

  1. bright

    Datei verschlüsseln

    Hallo, ich habe ein ähnlich gelagertes Problem. Ich möchte einen PublicKey aus einem keyfile instantieren. FileInputStream fis =new FileInputStream(PUBLIC_KEY_FILE); byte[] pubKeyBytes = new byte[(int)PUBLIC_KEY_FILE.length()]; fis.read(pubKeyBytes); fis.close(); KeyFactory keyFactory = KeyFactory.getInstance("RSA"); X509EncodedKeySpec pubSpec = new X509EncodedKeySpec(pubKeyBytes); RSAPublicKey pubKey = (RSAPublicKey) keyFactory.generatePublic(pubSpec); leider bekomme ich eine: java.security.InvalidKeyException: invalid key format Da key file hat folgendes Format: -----BEGIN PGP PUBLIC KEY BLOCK----- Version: PGP 6.5.2 mQGiBDlN8GERBADiIjPjksdfhklashd76a9wqcmGuuzfwHzNo+nHGNBa/UrI0XS6 somthing cutetd out here UUXcjNnHFKoQDHyWjk1lhBUfe/iWn0IYiL69TrZoLZPh7alkmYkARgQYEQIABgUC OU3wYQAKCRA9xJPyWjk1lhBUfeyWjk1lhBUfeyWjk1lhBOeRzJZfeACfc1HwyNx0 896YD5LYEqPB49SLfxc= =wOMv -----END PGP PUBLIC KEY BLOCK----- Welcher Algo steckt eigentlich hinter PGP? ist das RSA

Fachinformatiker.de, 2024 by SE Internet Services

fidelogo_small.png

Schicke uns eine Nachricht!

Fachinformatiker.de ist die größte IT-Community
rund um Ausbildung, Job, Weiterbildung für IT-Fachkräfte.

Fachinformatiker.de App

Download on the App Store
Get it on Google Play

Kontakt

Hier werben?
Oder sende eine E-Mail an

Social media u. feeds

Jobboard für Fachinformatiker und IT-Fachkräfte

×
×
  • Neu erstellen...