View Javadoc
1   /*
2    * Copyright (C) 2018, Salesforce. and others
3    *
4    * This program and the accompanying materials are made available under the
5    * terms of the Eclipse Distribution License v. 1.0 which is available at
6    * https://www.eclipse.org/org/documents/edl-v10.php.
7    *
8    * SPDX-License-Identifier: BSD-3-Clause
9    */
10  package org.eclipse.jgit.lib.internal;
11  
12  import java.nio.file.Path;
13  
14  import org.bouncycastle.openpgp.PGPSecretKey;
15  
16  /**
17   * Container which holds a {@link #getSecretKey()} together with the
18   * {@link #getOrigin() path it was loaded from}.
19   */
20  class BouncyCastleGpgKey {
21  
22  	private PGPSecretKey secretKey;
23  
24  	private Path origin;
25  
26  	public BouncyCastleGpgKey(PGPSecretKey secretKey, Path origin) {
27  		this.secretKey = secretKey;
28  		this.origin = origin;
29  	}
30  
31  	public PGPSecretKey getSecretKey() {
32  		return secretKey;
33  	}
34  
35  	public Path getOrigin() {
36  		return origin;
37  	}
38  }