gnu-crypto-discuss
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNU Crypto] java application


From: lilia belghith
Subject: [GNU Crypto] java application
Date: Sun, 29 Aug 2004 19:41:37 +0200 (CEST)

Hello,

I created an RSA key pair with gpg for windows. Now,  I want to use
the public key which is saved in a file (key.txt) on my disk to
encrypt a string variable (I perform this from external java
application).
I put this code:
 
import javax.crypto.*;
import gnu.crypto.jce.GnuCrypto;
import gnu.crypto.key.rsa.*;
  
java.security.Security.addProvider(new gnu.crypto.jce.GnuCrypto());
  
encrypt(java.security.PublicKey k,java.math.BigInteger m); 
  
My questions are: 
- How can I call the file that contain the public key?
- Where the parameter (string variable that I want to encrypt) have to
be passed?
- To what does the parameter 'm' refer to?  


Créez gratuitement votre Yahoo! Mail avec 100 Mo de stockage !
Créez votre Yahoo! Mail

Le nouveau Yahoo! Messenger est arrivé ! Découvrez toutes les nouveautés pour dialoguer instantanément avec vos amis. Téléchargez GRATUITEMENT ici !
reply via email to

[Prev in Thread] Current Thread [Next in Thread]