@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getPublicKey() == null) ? 0 : getPublicKey().hashCode()); hashCode = prime * hashCode + ((getPrivateKey() == null) ? 0 : getPrivateKey().hashCode()); return hashCode; }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof KeyPair == false) return false; KeyPair other = (KeyPair) obj; if (other.getPublicKey() == null ^ this.getPublicKey() == null) return false; if (other.getPublicKey() != null && other.getPublicKey().equals(this.getPublicKey()) == false) return false; if (other.getPrivateKey() == null ^ this.getPrivateKey() == null) return false; if (other.getPrivateKey() != null && other.getPrivateKey().equals(this.getPrivateKey()) == false) return false; return true; }
/** * Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be * redacted from this string using a placeholder value. * * @return A string representation of this object. * * @see java.lang.Object#toString() */ @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("{"); if (getPublicKey() != null) sb.append("PublicKey: ").append(getPublicKey()).append(","); if (getPrivateKey() != null) sb.append("PrivateKey: ").append("***Sensitive Data Redacted***"); sb.append("}"); return sb.toString(); }
/** * Marshall the given parameter object. */ public void marshall(KeyPair keyPair, ProtocolMarshaller protocolMarshaller) { if (keyPair == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(keyPair.getPublicKey(), PUBLICKEY_BINDING); protocolMarshaller.marshall(keyPair.getPrivateKey(), PRIVATEKEY_BINDING); } catch (Exception e) { throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e); } }
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getPublicKey() == null) ? 0 : getPublicKey().hashCode()); hashCode = prime * hashCode + ((getPrivateKey() == null) ? 0 : getPrivateKey().hashCode()); return hashCode; }
/** * Returns a string representation of this object; useful for testing and * debugging. * * @return A string representation of this object. * @see java.lang.Object#toString() */ @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("{"); if (getPublicKey() != null) sb.append("PublicKey: " + getPublicKey() + ","); if (getPrivateKey() != null) sb.append("PrivateKey: " + getPrivateKey()); sb.append("}"); return sb.toString(); }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof KeyPair == false) return false; KeyPair other = (KeyPair) obj; if (other.getPublicKey() == null ^ this.getPublicKey() == null) return false; if (other.getPublicKey() != null && other.getPublicKey().equals(this.getPublicKey()) == false) return false; if (other.getPrivateKey() == null ^ this.getPrivateKey() == null) return false; if (other.getPrivateKey() != null && other.getPrivateKey().equals(this.getPrivateKey()) == false) return false; return true; } }
public void marshall(KeyPair keyPair, AwsJsonWriter jsonWriter) throws Exception { jsonWriter.beginObject(); if (keyPair.getPublicKey() != null) { String publicKey = keyPair.getPublicKey(); jsonWriter.name("PublicKey"); jsonWriter.value(publicKey); } if (keyPair.getPrivateKey() != null) { String privateKey = keyPair.getPrivateKey(); jsonWriter.name("PrivateKey"); jsonWriter.value(privateKey); } jsonWriter.endObject(); }
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getPublicKey() == null) ? 0 : getPublicKey().hashCode()); hashCode = prime * hashCode + ((getPrivateKey() == null) ? 0 : getPrivateKey().hashCode()); return hashCode; }
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getPublicKey() == null) ? 0 : getPublicKey().hashCode()); hashCode = prime * hashCode + ((getPrivateKey() == null) ? 0 : getPrivateKey().hashCode()); return hashCode; }
/** * Returns a string representation of this object; useful for testing and * debugging. * * @return A string representation of this object. * @see java.lang.Object#toString() */ @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("{"); if (getPublicKey() != null) sb.append("PublicKey: " + getPublicKey() + ","); if (getPrivateKey() != null) sb.append("PrivateKey: " + getPrivateKey()); sb.append("}"); return sb.toString(); }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof KeyPair == false) return false; KeyPair other = (KeyPair) obj; if (other.getPublicKey() == null ^ this.getPublicKey() == null) return false; if (other.getPublicKey() != null && other.getPublicKey().equals(this.getPublicKey()) == false) return false; if (other.getPrivateKey() == null ^ this.getPrivateKey() == null) return false; if (other.getPrivateKey() != null && other.getPrivateKey().equals(this.getPrivateKey()) == false) return false; return true; }
/** * Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be * redacted from this string using a placeholder value. * * @return A string representation of this object. * * @see java.lang.Object#toString() */ @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("{"); if (getPublicKey() != null) sb.append("PublicKey: ").append(getPublicKey()).append(","); if (getPrivateKey() != null) sb.append("PrivateKey: ").append("***Sensitive Data Redacted***"); sb.append("}"); return sb.toString(); }
certResult.getKeyPair().getPrivateKey(), KEYSTORE_PATH, KEYSTORE_NAME,
/** * Marshall the given parameter object. */ public void marshall(KeyPair keyPair, ProtocolMarshaller protocolMarshaller) { if (keyPair == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(keyPair.getPublicKey(), PUBLICKEY_BINDING); protocolMarshaller.marshall(keyPair.getPrivateKey(), PRIVATEKEY_BINDING); } catch (Exception e) { throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e); } }
certResult.getKeyPair().getPrivateKey(), KEYSTORE_PATH, KEYSTORE_NAME,
certResult.getKeyPair().getPrivateKey(), KEYSTORE_PATH, KEYSTORE_NAME,
certResult.getKeyPair().getPrivateKey(), KEYSTORE_PATH, KEYSTORE_NAME,
certResult.getKeyPair().getPrivateKey(), KEYSTORE_PATH, KEYSTORE_NAME,
public void marshall(KeyPair keyPair, AwsJsonWriter jsonWriter) throws Exception { jsonWriter.beginObject(); if (keyPair.getPublicKey() != null) { String publicKey = keyPair.getPublicKey(); jsonWriter.name("PublicKey"); jsonWriter.value(publicKey); } if (keyPair.getPrivateKey() != null) { String privateKey = keyPair.getPrivateKey(); jsonWriter.name("PrivateKey"); jsonWriter.value(privateKey); } jsonWriter.endObject(); }