/** * Sets this {@link EntityProperty} using the serialized <code>Byte[]</code> value. * * @param value * The <code>Byte[]</code> value to set as the {@link EntityProperty} value. This value may be * <code>null</code>. */ public synchronized final void setValue(final Byte[] value) { this.edmType = EdmType.BINARY; this.type = Byte[].class; this.value = value == null ? null : Base64.encode(value); }
/** * Creates an instance of the <code>StorageCredentialsAccountAndKey</code> class, using the specified storage * account name and access key; the specified access key is stored as a <code>String</code>. * * @param accountName * A <code>String</code> that represents the name of the storage account. * @param key * A <code>String</code> that represents the Base-64-encoded account access key. */ public StorageCredentialsAccountAndKey(final String accountName, final String key) { this(accountName, Base64.decode(key)); }
/** * Gets the value of this {@link EntityProperty} as a <code>Byte</code> array. * * @return * A <code>Byte[]</code> representation of the {@link EntityProperty} value, or <code>null</code>. */ public Byte[] getValueAsByteObjectArray() { return this.getIsNull() ? null : Base64.decodeAsByteObjectArray(this.value); }
@Override public boolean validate(final Credentials credentials, final LoginOptions options) { if(super.validate(credentials, options)) { if(options.password) { return Base64.validateIsBase64String(credentials.getPassword()); } return true; } return false; } }
if (Base64.validateIsBase64String(accountKey)) { return new StorageCredentialsAccountAndKey(accountName, accountKey);
/** * Sets this {@link EntityProperty} using the serialized <code>Byte[]</code> value. * * @param value * The <code>Byte[]</code> value to set as the {@link EntityProperty} value. This value may be * <code>null</code>. */ public synchronized final void setValue(final Byte[] value) { this.edmType = EdmType.BINARY; this.type = Byte[].class; this.value = value == null ? null : Base64.encode(value); }
/** * Creates an instance of the <code>StorageCredentialsAccountAndKey</code> class, using the specified storage * account name and access key; the specified access key is stored as a <code>String</code>. * * @param accountName * A <code>String</code> that represents the name of the storage account. * @param key * A <code>String</code> that represents the Base-64-encoded account access key. */ public StorageCredentialsAccountAndKey(final String accountName, final String key) { this(accountName, Base64.decode(key)); }
if (Base64.validateIsBase64String(accountKey)) { return new StorageCredentialsAccountAndKey(accountName, accountKey);
/** * Gets the value of this {@link EntityProperty} as a <code>Byte</code> array. * * @return * A <code>Byte[]</code> representation of the {@link EntityProperty} value, or <code>null</code>. */ public Byte[] getValueAsByteObjectArray() { return this.getIsNull() ? null : Base64.decodeAsByteObjectArray(this.value); }
/** * Sets this {@link EntityProperty} using the serialized <code>byte[]</code> value. * * @param value * The <code>byte[]</code> value to set as the {@link EntityProperty} value. This value may be * <code>null</code>. */ public synchronized final void setValue(final byte[] value) { this.edmType = EdmType.BINARY; this.type = byte[].class; this.value = value == null ? null : Base64.encode(value); }
/** * Sets the name of the access key to be used when signing the request. * * @param key * A <code>String</code> that represents the name of the access key to be used when signing the request. */ public synchronized void updateKey(final String key) { this.updateKey(Base64.decode(key)); }
if (Utility.isNullOrEmpty(blockId) || !Base64.validateIsBase64String(blockId)) { throw new IllegalArgumentException(SR.INVALID_BLOCK_ID);
/** * Exports the value of the access key to a Base64-encoded string. * * @return A <code>String</code> that represents the Base64-encoded access key. */ public String exportBase64EncodedKey() { return Base64.encode(this.key); }
/** * Gets the value of this {@link EntityProperty} as a <code>byte</code> array. * * @return * A <code>byte[]</code> representation of the {@link EntityProperty} value, or <code>null</code>. */ public byte[] getValueAsByteArray() { return this.getIsNull() ? null : Base64.decode(this.value); }
if (Utility.isNullOrEmpty(blockId) || !Base64.validateIsBase64String(blockId)) { throw new IllegalArgumentException(SR.INVALID_BLOCK_ID);
/** * Sets this {@link EntityProperty} using the serialized <code>byte[]</code> value. * * @param value * The <code>byte[]</code> value to set as the {@link EntityProperty} value. This value may be * <code>null</code>. */ public synchronized final void setValue(final byte[] value) { this.edmType = EdmType.BINARY; this.type = byte[].class; this.value = value == null ? null : Base64.encode(value); }
/** * Gets the value of this {@link EntityProperty} as a <code>byte</code> array. * * @return * A <code>byte[]</code> representation of the {@link EntityProperty} value, or <code>null</code>. */ public byte[] getValueAsByteArray() { return this.getIsNull() ? null : Base64.decode(this.value); }
if (Utility.isNullOrEmpty(blockId) || !Base64.validateIsBase64String(blockId)) { throw new IllegalArgumentException(SR.INVALID_BLOCK_ID);
/** * Exports the value of the access key to a Base64-encoded string. * * @return A <code>String</code> that represents the Base64-encoded access key. */ public String exportBase64EncodedKey() { return Base64.encode(this.key); }
/** * Sets the name of the access key to be used when signing the request. * * @param key * A <code>String</code> that represents the name of the access key to be used when signing the request. */ public synchronized void updateKey(final String key) { this.updateKey(Base64.decode(key)); }