Package com.github.sannies.nexusaptplugin.sign

Examples of com.github.sannies.nexusaptplugin.sign.PGPSigner


    byte[] release = fileManager.getFile("Release", data);

    // Get the key and sign the Release file
    ByteArrayOutputStream baos = new ByteArrayOutputStream();

    PGPSigner signer = signingConfiguration.getSigner();
    PGPSignatureGenerator signatureGenerator = new PGPSignatureGenerator(new BcPGPContentSignerBuilder(signer.getSecretKey().getPublicKey().getAlgorithm(), PGPUtil.SHA1));
    signatureGenerator.init(PGPSignature.BINARY_DOCUMENT, signer.getPrivateKey());

    BCPGOutputStream out = new BCPGOutputStream(new ArmoredOutputStream(baos));
    signatureGenerator.update(release);
    signatureGenerator.generate().encode(out);
View Full Code Here


  public byte[] generateFile(RepositoryData data)
    throws Exception
  {
    // Extract the key and return it
    ByteArrayOutputStream baos = new ByteArrayOutputStream();
    PGPSigner signer = configuration.getSigner();
    PGPPublicKey publicKey = signer.getSecretKey().getPublicKey();

    BCPGOutputStream out = new BCPGOutputStream(new ArmoredOutputStream(baos));
    publicKey.encode(out);

    out.close();
View Full Code Here

TOP

Related Classes of com.github.sannies.nexusaptplugin.sign.PGPSigner

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.