Package org.jclouds.digitalocean2.ssh
Class DSAKeys
- java.lang.Object
-
- org.jclouds.digitalocean2.ssh.DSAKeys
-
-
Constructor Summary
Constructors Constructor Description DSAKeys()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static StringencodeAsOpenSSH(DSAPublicKey key)static Stringfingerprint(BigInteger p, BigInteger q, BigInteger g, BigInteger y)Create a fingerprint per the following specstatic StringfingerprintPublicKey(String publicKeyOpenSSH)static DSAPublicKeySpecpublicKeySpecFromOpenSSH(com.google.common.io.ByteSource supplier)ReturnsDSAPublicKeySpecwhich was OpenSSH Base64 Encodedid_rsa.pubstatic DSAPublicKeySpecpublicKeySpecFromOpenSSH(String idDsaPub)Executesorg.jclouds.crypto.Pems#publicKeySpecFromOpenSSH(com.google.common.io.InputSupplier)on the string which was OpenSSH Base64 Encodedid_rsa.pub
-
-
-
Method Detail
-
encodeAsOpenSSH
public static String encodeAsOpenSSH(DSAPublicKey key)
-
publicKeySpecFromOpenSSH
public static DSAPublicKeySpec publicKeySpecFromOpenSSH(String idDsaPub)
Executesorg.jclouds.crypto.Pems#publicKeySpecFromOpenSSH(com.google.common.io.InputSupplier)on the string which was OpenSSH Base64 Encodedid_rsa.pub- Parameters:
idRsaPub- formattedssh-dss AAAAB3NzaC1yc2EAAAADAQABAAAB...- See Also:
org.jclouds.crypto.Pems#publicKeySpecFromOpenSSH(com.google.common.io.InputSupplier)
-
publicKeySpecFromOpenSSH
public static DSAPublicKeySpec publicKeySpecFromOpenSSH(com.google.common.io.ByteSource supplier) throws IOException
ReturnsDSAPublicKeySpecwhich was OpenSSH Base64 Encodedid_rsa.pub- Parameters:
supplier- the input stream factory, formattedssh-dss AAAAB3NzaC1yc2EAAAADAQABAAAB...- Returns:
- the
DSAPublicKeySpecwhich was OpenSSH Base64 Encodedid_rsa.pub - Throws:
IOException- if an I/O error occurs
-
fingerprintPublicKey
public static String fingerprintPublicKey(String publicKeyOpenSSH)
- Parameters:
publicKeyOpenSSH- RSA public key in OpenSSH format- Returns:
- fingerprint ex.
2b:a9:62:95:5b:8b:1d:61:e0:92:f7:03:10:e9:db:d9
-
fingerprint
public static String fingerprint(BigInteger p, BigInteger q, BigInteger g, BigInteger y)
Create a fingerprint per the following spec- Returns:
- hex fingerprint ex.
2b:a9:62:95:5b:8b:1d:61:e0:92:f7:03:10:e9:db:d9
-
-