public class OpenSSHPublicKeyUtil
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
static byte[] |
encodePublicKey(AsymmetricKeyParameter cipherParameters)
Encode a public key from an AsymmetricKeyParameter instance.
|
static AsymmetricKeyParameter |
parsePublicKey(byte[] encoded)
Parse a public key.
|
static AsymmetricKeyParameter |
parsePublicKey(org.bouncycastle.crypto.util.SSHBuffer buffer)
Parse a public key from an SSHBuffer instance.
|
public static AsymmetricKeyParameter parsePublicKey(byte[] encoded)
This method accepts the bytes that are Base64 encoded in an OpenSSH public key file.
encoded - The key.public static byte[] encodePublicKey(AsymmetricKeyParameter cipherParameters) throws java.io.IOException
cipherParameters - The key to encode.java.io.IOExceptionpublic static AsymmetricKeyParameter parsePublicKey(org.bouncycastle.crypto.util.SSHBuffer buffer)
buffer - containing the SSH public key.