new String(Base64.decodeBase64(auth), StandardCharsets.UTF_8); String username = usernameColonPassword.substring(0, usernameColonPassword.indexOf(":")); String password = usernameColonPassword.substring(usernameColonPassword.indexOf(":") + 1);
/** * Fingerprint of the target pools information, which is a hash of the contents. This field is * used for optimistic locking when you update the target pool entries. This field is optional. * @see #getFingerprint() * @return Base64 decoded value or {@code null} for none * * @since 1.14 */ public byte[] decodeFingerprint() { return com.google.api.client.util.Base64.decodeBase64(fingerprint); }
/** * Optional. Note: `etag` is an inoperable legacy field that is only returned for backwards * compatibility. * @see #getEtag() * @return Base64 decoded value or {@code null} for none * * @since 1.14 */ public byte[] decodeEtag() { return com.google.api.client.util.Base64.decodeBase64(etag); }
/** * The public key data. Only provided in `GetServiceAccountKey` responses. * @see #getPublicKeyData() * @return Base64 decoded value or {@code null} for none * * @since 1.14 */ public byte[] decodePublicKeyData() { return com.google.api.client.util.Base64.decodeBase64(publicKeyData); }
/** * The signed blob. * @see #getSignature() * @return Base64 decoded value or {@code null} for none * * @since 1.14 */ public byte[] decodeSignature() { return com.google.api.client.util.Base64.decodeBase64(signature); }
/** * The decrypted data originally supplied in EncryptRequest.plaintext. * @see #getPlaintext() * @return Base64 decoded value or {@code null} for none * * @since 1.14 */ public byte[] decodePlaintext() { return com.google.api.client.util.Base64.decodeBase64(plaintext); }
/** * A message digest produced with the SHA-512 algorithm. * @see #getSha512() * @return Base64 decoded value or {@code null} for none * * @since 1.14 */ public byte[] decodeSha512() { return com.google.api.client.util.Base64.decodeBase64(sha512); }
/** * Output only. The attestation data provided by the HSM when the key operation was performed. * @see #getContent() * @return Base64 decoded value or {@code null} for none * * @since 1.14 */ public byte[] decodeContent() { return com.google.api.client.util.Base64.decodeBase64(content); }
/** * Next page token. * @see #getNextPageToken() * @return Base64 decoded value or {@code null} for none * * @since 1.14 */ public byte[] decodeNextPageToken() { return com.google.api.client.util.Base64.decodeBase64(nextPageToken); }
/** * Fingerprint hash of contents stored in this network interface. This field will be ignored when * inserting an Instance or adding a NetworkInterface. An up-to-date fingerprint must be provided * in order to update the NetworkInterface. * @see #getFingerprint() * @return Base64 decoded value or {@code null} for none * * @since 1.14 */ public byte[] decodeFingerprint() { return com.google.api.client.util.Base64.decodeBase64(fingerprint); }
/** * The message data field. If this field is empty, the message must contain at least one * attribute. * @see #getData() * @return Base64 decoded value or {@code null} for none * * @since 1.14 */ public byte[] decodeData() { return com.google.api.client.util.Base64.decodeBase64(data); }
/** * The body data of a MIME message part as a base64url encoded string. May be empty for MIME * container types that have no message body or when the body data is sent as a separate * attachment. An attachment ID is present if the body data is contained in a separate attachment. * @see #getData() * @return Base64 decoded value or {@code null} for none * * @since 1.14 */ public byte[] decodeData() { return com.google.api.client.util.Base64.decodeBase64(data); }
/** * Base64 encoded photo data * @see #getPhotoData() * @return Base64 decoded value or {@code null} for none * * @since 1.14 */ public byte[] decodePhotoData() { return com.google.api.client.util.Base64.decodeBase64(photoData); }
/** * The entire email message in an RFC 2822 formatted and base64url encoded string. Returned in * messages.get and drafts.get responses when the format=RAW parameter is supplied. * @see #getRaw() * @return Base64 decoded value or {@code null} for none * * @since 1.14 */ public byte[] decodeRaw() { return com.google.api.client.util.Base64.decodeBase64(raw); }
/** * The created signature. * @see #getSignature() * @return Base64 decoded value or {@code null} for none * * @since 1.14 */ public byte[] decodeSignature() { return com.google.api.client.util.Base64.decodeBase64(signature); }
/** * The decrypted data originally encrypted with the matching public key. * @see #getPlaintext() * @return Base64 decoded value or {@code null} for none * * @since 1.14 */ public byte[] decodePlaintext() { return com.google.api.client.util.Base64.decodeBase64(plaintext); }
/** * The byte representation of the data (limited to 128 kB), as a Base64-encoded string with the * URL_SAFE encoding option. * @see #getData() * @return Base64 decoded value or {@code null} for none * * @since 1.14 */ public byte[] decodeData() { return com.google.api.client.util.Base64.decodeBase64(data); }
/** * Required. The data encrypted with the named CryptoKeyVersion's public key using OAEP. * @see #getCiphertext() * @return Base64 decoded value or {@code null} for none * * @since 1.14 */ public byte[] decodeCiphertext() { return com.google.api.client.util.Base64.decodeBase64(ciphertext); }
public Key parseOldStyleAppEngineKey(final String urlsafeKey) throws InvalidProtocolBufferException { Descriptors.Descriptor referenceDescriptor = keyDescriptor.findMessageTypeByName("Reference"); byte[] userKey = Base64.decodeBase64(urlsafeKey); DynamicMessage userKeyMessage = DynamicMessage.newBuilder(referenceDescriptor).mergeFrom(userKey).build(); String app = (String) userKeyMessage.getField(referenceDescriptor.findFieldByName("app"));
static List<TableRow> rowsFromEncodedQuery(String query) throws IOException { ListCoder<TableRow> listCoder = ListCoder.of(TableRowJsonCoder.of()); ByteArrayInputStream input = new ByteArrayInputStream(Base64.decodeBase64(query)); List<TableRow> rows = listCoder.decode(input, Context.OUTER); for (TableRow row : rows) { convertNumbers(row); } return rows; }