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_KEYprivate static byte[]ENCODED_PUBLIC_KEY
-
Constructor Summary
Constructors Modifier Constructor Description privateSecurityTestUtils()
-
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.RSAPrivateKeynewRsaPrivateKey()Returns a new sample RSA private key that matchesnewRsaPublicKey().static java.security.interfaces.RSAPublicKeynewRsaPublicKey()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.GeneralSecurityExceptionReturns a new sample RSA private key that matchesnewRsaPublicKey().- Throws:
java.security.GeneralSecurityException
-
newRsaPublicKey
public static java.security.interfaces.RSAPublicKey newRsaPublicKey() throws java.security.GeneralSecurityExceptionReturns a new sample RSA public key that matchesnewRsaPrivateKey().- Throws:
java.security.GeneralSecurityException
-
-