Package gnu.javax.crypto.key.dh

Examples of gnu.javax.crypto.key.dh.DHKeyPairPKCS8Codec


    DHPublicKey pubK = (DHPublicKey) kp.getPublic();
    DHPrivateKey secK = (DHPrivateKey) kp.getPrivate();

    pk = ((GnuDHPrivateKey) secK).getEncoded(IKeyPairCodec.PKCS8_FORMAT);
    PrivateKey newSecK = new DHKeyPairPKCS8Codec().decodePrivateKey(pk);
    harness.check(secK.equals(newSecK),
                  "DH private key ASN.1 encoder/decoder test");

    pk = ((GnuDHPublicKey) pubK).getEncoded(IKeyPairCodec.X509_FORMAT);
    PublicKey newPubK = new DHKeyPairX509Codec().decodePublicKey(pk);
View Full Code Here

TOP

Related Classes of gnu.javax.crypto.key.dh.DHKeyPairPKCS8Codec

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.