Examples of encode()


Examples of org.arch.event.misc.EncryptEventV2.encode()

    }
    encrypt.ev = ev;
    encrypt.setHash(ev.getHash());
    Buffer buf = new Buffer(256);
    BufferHelper.writeFixInt32(buf, 1, true);
    encrypt.encode(buf);
    int tmp = buf.getWriteIndex();
    int len = tmp - 4;
    buf.setWriteIndex(0);
    BufferHelper.writeFixInt32(buf, len, true);
    buf.setWriteIndex(tmp);

Examples of org.azeckoski.reflectutils.transcoders.Transcoder.encode()

        }
        String encoded = "";
        if (data != null) {
            Transcoder transcoder = getTranscoder(format);
            try {
                encoded = transcoder.encode(data, name, properties);
            } catch (RuntimeException e) {
                // convert failure to UOE
                throw new UnsupportedOperationException("Failure encoding data ("+data+") of type ("+data.getClass()+"): " + e.getMessage(), e);
            }
        }

Examples of org.boris.xlloop.handler.FunctionInformation.encode()

        FunctionInformation fi = new FunctionInformation("Math.pow");
        fi.setFunctionHelp("Raises the first value to the power of the second");
        fi.setCategory("Maths");
        fi.addArgument("value", "The first value");
        fi.addArgument("power", "The power value");
        System.out.println(fi.encode());
    }
}

Examples of org.bouncycastle.openpgp.PGPPublicKey.encode()

            publicOut = new ArmoredOutputStream(publicOut);
        }

        PGPPublicKey    key = secretKey.getPublicKey();
       
        key.encode(publicOut);
       
        publicOut.close();
    }
   
    public static void main(

Examples of org.bouncycastle.openpgp.PGPPublicKeyRing.encode()

        // write a public key
        //
        ByteArrayOutputStream    bOut = new ByteArrayOutputStream();
        BCPGOutputStream         pOut = new BCPGOutputStream(bOut);
       
        pgpPub.encode(pOut);

        if (!areEqual(bOut.toByteArray(), testPubKey))   
        {
            fail("public key rewrite failed");
        }

Examples of org.bouncycastle.openpgp.PGPPublicKeyRingCollection.encode()

        OutputStream fos = null;
        try {
            final PGPPublicKeyRingCollection newCollection = new PGPPublicKeyRingCollection(
                    stillTrusted);
            fos = new FileOutputStream(ROO_PGP_FILE);
            newCollection.encode(fos);
        }
        catch (final Exception e) {
            throw new IllegalStateException(e);
        }
        finally {

Examples of org.bouncycastle.openpgp.PGPSecretKey.encode()

        secretKey = new PGPSecretKey(PGPSignature.DEFAULT_CERTIFICATION, PublicKeyAlgorithmTags.RSA_GENERAL, kp.getPublic(), kp.getPrivate(), new Date(), "fred", null, null, new JcaPGPContentSignerBuilder(PublicKeyAlgorithmTags.RSA_GENERAL, HashAlgorithmTags.SHA1).setProvider("BC"), new BcPBESecretKeyEncryptorBuilder(SymmetricKeyAlgorithmTags.AES_256).build(passPhrase));
   
        secretKey.extractPrivateKey(new BcPBESecretKeyDecryptorBuilder(new BcPGPDigestCalculatorProvider()).build(passPhrase));
       
        secretKey.encode(new ByteArrayOutputStream());
       
        //
        // secret key password changing.
        //
        String  newPass = "newPass";

Examples of org.bouncycastle.openpgp.PGPSecretKeyRing.encode()

            // write a v3 private key
            //
            bOut = new ByteArrayOutputStream();
            pOut = new BCPGOutputStream(bOut);

            pgpPriv.encode(pOut);

            if (!areEqual(bOut.toByteArray(), testPrivKeyV3))
            {
                fail("private key V3 rewrite failed");
            }

Examples of org.bouncycastle.openpgp.PGPSignature.encode()

        if (sig.getCreationTime().getTime() == 0)
        {
            fail("creation time not set in v4 signature");
        }

        sig.encode(bOut);
   
        verifySignature(bOut.toByteArray(), hashAlgorithm, pubKey, canonicalData);
    }
   
    private void testSigV3(

Examples of org.bouncycastle.util.encoders.Base64.encode()

                true, "UTF-8");

        // Digest of the entire manifest
        mManifest.write(print);
        print.flush();
        main.putValue(DIGEST_MANIFEST_ATTR, new String(base64.encode(md.digest()), "ASCII"));

        Map<String, Attributes> entries = mManifest.getEntries();
        for (Map.Entry<String, Attributes> entry : entries.entrySet()) {
            // Digest of the manifest stanza for this entry.
            print.print("Name: " + entry.getKey() + "\r\n");
TOP
Copyright © 2018 www.massapi.com. 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.