Package org.bouncycastle.openpgp.jcajce

Examples of org.bouncycastle.openpgp.jcajce.JcaPGPSecretKeyRingCollection


    @SuppressWarnings("unchecked")
    public License loadKey(final InputStream inputStream, final String userId)
            throws IOException, PGPException {
        final InputStream decoderInputStream = PGPUtil.getDecoderStream(inputStream);

        final PGPSecretKeyRingCollection pgpSec = new JcaPGPSecretKeyRingCollection(decoderInputStream);

        key = null;
        for (final PGPSecretKeyRing kRing : in((Iterator<PGPSecretKeyRing>) pgpSec
                .getKeyRings())) {
            for (final PGPSecretKey k : in((Iterator<PGPSecretKey>) kRing
                    .getSecretKeys())) {
                for (final String keyUserId : in((Iterator<String>) k
                        .getUserIDs())) {
View Full Code Here

TOP

Related Classes of org.bouncycastle.openpgp.jcajce.JcaPGPSecretKeyRingCollection

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.