Class KeyEncodeHelper
- java.lang.Object
-
- org.jenkinsci.main.modules.cli.auth.ssh.KeyEncodeHelper
-
public class KeyEncodeHelper extends Object
This class help to encode RSA and DSA keys to OpenSSH format Methods came from Apache Mina SSH classes https://github.com/apache/mina-sshd/blob/master/sshd-common/src/main/java/org/apache/sshd/common/config/keys/impl/DSSPublicKeyEntryDecoder.java https://github.com/apache/mina-sshd/blob/master/sshd-common/src/main/java/org/apache/sshd/common/config/keys/impl/RSAPublicKeyDecoder.java https://github.com/apache/mina-sshd/blob/master/sshd-common/src/main/java/org/apache/sshd/common/config/keys/KeyEntryResolver.java
-
-
Constructor Summary
Constructors Constructor Description KeyEncodeHelper()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static int
encodeBigInt(OutputStream s, BigInteger v)
static byte[]
encodeInt(OutputStream s, int v)
static int
encodeString(OutputStream s, String v, Charset cs)
static int
writeRLEBytes(OutputStream s, byte[] bytes, int off, int len)
-
-
-
Method Detail
-
encodeBigInt
public static int encodeBigInt(OutputStream s, BigInteger v) throws IOException
- Throws:
IOException
-
encodeInt
public static byte[] encodeInt(OutputStream s, int v) throws IOException
- Throws:
IOException
-
encodeString
public static int encodeString(OutputStream s, String v, Charset cs) throws IOException
- Throws:
IOException
-
writeRLEBytes
public static int writeRLEBytes(OutputStream s, byte[] bytes, int off, int len) throws IOException
- Throws:
IOException
-
-