dclpo.blogg.se

Decrypt rsa 2048 python
Decrypt rsa 2048 python













decrypt rsa 2048 python decrypt rsa 2048 python

This.encryptedText = RSACrypto.encrypt("PLAIN TEXT", sb.toString()) Then I am using below code to decrypt the data File privfile = new File("C:\\temp-ldi\\privkey.txt") įile pubfile = new File("C:\\temp-ldi\\pubkey.txt") įileReader reader = new FileReader(pubfile) īufferedReader br = new BufferedReader(reader) Writer.write(new BASE64Encoder().encode(RSACrypto.privKeyToBytes(RSACrypto.privateKey))) Writer.write(new BASE64Encoder().encode(RSACrypto.pubKeyToBytes(RSACrypto.publicKey))) įile = new File("C:\\temp-ldi\\privkey.txt") We have one public key and private key and will be using same throughout.īut the problem is, when I decrypt, I am getting : Data must start with zero File file = new File("C:\\temp-ldi\\pubkey.txt") įileWriter writer = new FileWriter(file) ĮncryptedText = RSACrypto.encrypt("PLAIN TEXT") //no argument of pub-key, generate key pair I am trying to encrypt and decrypt the data with RSA 2048.















Decrypt rsa 2048 python