public static byte [ ] convertToKeyByteArray ( String yourGooglePrivateKeyString ) { yourGooglePrivateKeyString = yourGooglePrivateKeyString . replace ( ' ' , ' ' ) ; yourGooglePrivateKeyString = yourGooglePrivateKeyString . replace ( ' ' , ' ' ) ; return Base64 . getDecoder ( ) . decode ( yourGooglePrivateKeyString ) ; }
Converts the given private key as String to an base 64 encoded byte array .