Package cryptix.pki

Examples of cryptix.pki.PrincipalBuilder


                KeyPairGenerator.getInstance("OpenPGP/Signing/DSA");
            kpg.initialize(1024, sr);
            KeyPair kp = kpg.generateKeyPair();
            PublicKey pubkey = kp.getPublic();
            PrivateKey privkey = kp.getPrivate();
            PrincipalBuilder princbuilder =
                PrincipalBuilder.getInstance("OpenPGP/UserID");
            Principal userid =
                princbuilder.build(name + " <"+jid+">");
            CertificateBuilder certbuilder =
                CertificateBuilder.getInstance("OpenPGP/Self");
            Certificate cert = certbuilder.build(pubkey, userid, privkey, sr);
            complexPublicKey.addCertificate(cert);
            complexPrivateKey.addCertificate(cert);
View Full Code Here

TOP

Related Classes of cryptix.pki.PrincipalBuilder

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.