Encrypt xml with private key

2007-09-21 Thread huang zhimin
Can anybody give me an example to encrypt xml with private key? -- http://sourceforge.net/projects/mycodeline/ http://rubyforge.org/projects/ropenwiki/

Re: Encrypt xml with private key

2007-09-21 Thread huang zhimin
tion in > http://xml.apache.org/security/dist/java-library/) > > huang zhimin ha scritto: > > Can anybody give me an example to encrypt xml with private key? > > > > -- > > http://sourceforge.net/projects/mycodeline/ > > http://rubyforge.org/projects/ropenw

Re: Encrypt xml with private key

2007-09-21 Thread huang zhimin
. You can find them at > SUN java site http://java.sun.com, in the section of jdk downloads. > Choose the proper file for your version of jdk. > > > huang zhimin ha scritto: > > public void encrypt(Document document) throws Exception { > > KeyStore ks = getK

No provider for SHA-256

2007-09-22 Thread huang zhimin
public void encrypt(Document document) throws Exception { KeyStore ks = getKeyStore(); X509Certificate certificate = getCertificate(ks); String algorithmURI = XMLCipher.SHA256; Element rootElement = document.getDocumentElement(); XMLCipher xmlCipher = XMLCi

Encrypt the xml with public certificate key

2007-09-24 Thread huang zhimin
I tried several times, but always failed. Can anybody give me an example about how to encrypt xml with public certificate key? -- http://sourceforge.net/projects/mycodeline/ http://rubyforge.org/projects/ropenwiki/

Encrypt the xml with public certificate key

2007-09-24 Thread huang zhimin
I tried several times, but always failed. Can anybody give me an example about how to encrypt xml with public certificate key? -- http://sourceforge.net/projects/mycodeline/ http://rubyforge.org/projects/ropenwiki/

Verification failed for URI ""

2007-12-26 Thread huang zhimin
The code is similar to the samples given by CreateSignature.java and VerifySignature.java. When I run the code in the same machine, verifying is successful. But if I put the code on two machines, one to create signature, the other to verify, verifying is failed for *Verification failed for URI "" *

encrypt with pkcs12 private key

2008-03-21 Thread huang zhimin
I use BouncyCastleProvider to get a private key from a p12 file, when i use the private key to encrypt xml document, i get the exception as follows: org.apache.xml.security.signature.XMLSignatureException: No installed provider supports this key: org.bouncycastle.jce.provider.JCERSAPrivateCrtKey O

Re: encrypt with pkcs12 private key

2008-03-21 Thread huang zhimin
wrote: > >> Why would you want to encrypt with a private key? Anyone with the > >> corresponding public key (which is, after all, public) can decrypt the > >> message, rendering the encryption useless. > >> > >> > ---