Package fr.jayasoft.crypto.decoder

Examples of fr.jayasoft.crypto.decoder.RSADecoder


        }
        return p;
    }
   
    public static Decoder createRSADecoder(File keyFile) throws IOException {
        return new RSADecoder((RSAPrivateKey)RSAHelper.readPrivateKeyFile(keyFile));
    }
View Full Code Here


public class RSATester {
  public static void main(String[] args) {
    KeyPair kp = RSAHelper.generateKeyPair();
        RSAEncoder encoder = new RSAEncoder((RSAPublicKey)kp.getPublic());
        RSADecoder decoder = new RSADecoder((RSAPrivateKey)kp.getPrivate());
       
        byte[] src = "test".getBytes();
        byte[] enc;
        byte[] dec;
       
        enc = encoder.encode(src);
        dec = decoder.decode(enc);
        System.out.println("done");
  }
View Full Code Here

TOP

Related Classes of fr.jayasoft.crypto.decoder.RSADecoder

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.