All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.amazonaws.encryptionsdk.model.DecryptionMaterials Maven / Gradle / Ivy

There is a newer version: 3.0.1
Show newest version
package com.amazonaws.encryptionsdk.model;

import java.security.PublicKey;

import com.amazonaws.encryptionsdk.DataKey;

public final class DecryptionMaterials {
    private final DataKey dataKey;
    private final PublicKey trailingSignatureKey;

    private DecryptionMaterials(Builder b) {
        dataKey = b.getDataKey();
        trailingSignatureKey = b.getTrailingSignatureKey();
    }

    public DataKey getDataKey() {
        return dataKey;
    }

    public PublicKey getTrailingSignatureKey() {
        return trailingSignatureKey;
    }

    public static Builder newBuilder() {
        return new Builder();
    }

    public Builder toBuilder() {
        return new Builder(this);
    }

    public static final class Builder {
        private DataKey dataKey;
        private PublicKey trailingSignatureKey;

        private Builder(DecryptionMaterials result) {
            this.dataKey = result.getDataKey();
            this.trailingSignatureKey = result.getTrailingSignatureKey();
        }

        private Builder() {}

        public DataKey getDataKey() {
            return dataKey;
        }

        public Builder setDataKey(DataKey dataKey) {
            this.dataKey = dataKey;
            return this;
        }

        public PublicKey getTrailingSignatureKey() {
            return trailingSignatureKey;
        }

        public Builder setTrailingSignatureKey(PublicKey trailingSignatureKey) {
            this.trailingSignatureKey = trailingSignatureKey;
            return this;
        }

        public DecryptionMaterials build() {
            return new DecryptionMaterials(this);
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy