-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #19 from sparsick/hostkey
Add Host Key Information
- Loading branch information
Showing
3 changed files
with
105 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
41 changes: 41 additions & 0 deletions
41
src/main/java/com/github/sparsick/testcontainers/gitserver/SshHostKey.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
package com.github.sparsick.testcontainers.gitserver; | ||
|
||
import java.util.Objects; | ||
|
||
|
||
/** | ||
* Value object for SSH Host key information. | ||
*/ | ||
public class SshHostKey { | ||
|
||
private String hostname; | ||
private byte[] key; | ||
|
||
/** | ||
* SSH Host Key information | ||
* @param hostname host | ||
* @param key keystring | ||
*/ | ||
public SshHostKey(String hostname, byte[] key) { | ||
this.key = key; | ||
this.hostname = hostname; | ||
} | ||
|
||
/** | ||
* Public key of the host key. | ||
* | ||
* @return key string | ||
*/ | ||
public byte[] getKey() { | ||
return key; | ||
} | ||
|
||
/** | ||
* Name of the host | ||
* | ||
* @return name of the host | ||
*/ | ||
public String getHostname() { | ||
return hostname; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters