Class SecurityTestUtils
- java.lang.Object
-
- com.google.api.client.testing.util.SecurityTestUtils
-
@Beta public final class SecurityTestUtils extends java.lang.Object
- Since:
- 1.14
-
-
Field Summary
Fields Modifier and Type Field Description private static byte[]
ENCODED_PRIVATE_KEY
private static byte[]
ENCODED_PUBLIC_KEY
-
Constructor Summary
Constructors Modifier Constructor Description private
SecurityTestUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static byte[]
newEncodedRsaPrivateKeyBytes()
Returns a new copy of a sample encoded RSA private key that matchesnewEncodedRsaPublicKeyBytes()
.static byte[]
newEncodedRsaPublicKeyBytes()
Returns a new copy of a sample encoded public key that matchesnewEncodedRsaPrivateKeyBytes()
.static java.security.interfaces.RSAPrivateKey
newRsaPrivateKey()
Returns a new sample RSA private key that matchesnewRsaPublicKey()
.static java.security.interfaces.RSAPublicKey
newRsaPublicKey()
Returns a new sample RSA public key that matchesnewRsaPrivateKey()
.
-
-
-
Method Detail
-
newEncodedRsaPrivateKeyBytes
public static byte[] newEncodedRsaPrivateKeyBytes()
Returns a new copy of a sample encoded RSA private key that matchesnewEncodedRsaPublicKeyBytes()
.
-
newEncodedRsaPublicKeyBytes
public static byte[] newEncodedRsaPublicKeyBytes()
Returns a new copy of a sample encoded public key that matchesnewEncodedRsaPrivateKeyBytes()
.
-
newRsaPrivateKey
public static java.security.interfaces.RSAPrivateKey newRsaPrivateKey() throws java.security.GeneralSecurityException
Returns a new sample RSA private key that matchesnewRsaPublicKey()
.- Throws:
java.security.GeneralSecurityException
-
newRsaPublicKey
public static java.security.interfaces.RSAPublicKey newRsaPublicKey() throws java.security.GeneralSecurityException
Returns a new sample RSA public key that matchesnewRsaPrivateKey()
.- Throws:
java.security.GeneralSecurityException
-
-