18 package org.turro.push.service;
20 import java.security.PublicKey;
28 private final PublicKey publicKey;
29 private final byte[] salt;
30 private final byte[] ciphertext;
32 public Encrypted(
final PublicKey publicKey,
final byte[] salt,
final byte[] ciphertext) {
33 this.publicKey = publicKey;
35 this.ciphertext = ciphertext;
50 public static class Builder {
52 private PublicKey publicKey;
54 private byte[] ciphertext;
56 public Builder withPublicKey(PublicKey publicKey) {
57 this.publicKey = publicKey;
62 public Builder withSalt(
byte[] salt) {
68 public Builder withCiphertext(
byte[] ciphertext) {
69 this.ciphertext = ciphertext;
75 return new Encrypted(publicKey, salt, ciphertext);
Encrypted(final PublicKey publicKey, final byte[] salt, final byte[] ciphertext)