<?php
namespace Fifa\ConnectServiceBus\Sdk\Encryption\Model;

/**
 * Class PrivateCertificate
 * @package Fifa\ConnectServiceBus\Sdk\Encryption\Model
 */
class PrivateCertificate
{
    /**
     * @var string
     */
    private $key;

    /**
     * @var string
     */
    private $password;

    /**
     * Constructor
     *
     * @param string $key
     * @param string $password
     */
    public function __construct(string $key, string $password = '')
    {
        $this->setKey($key);
        $this->setPassword($password);
    }

    /**
     * Gets a key
     *
     * @return string
     */
    public function getKey(): string
    {
        return $this->key;
    }

    /**
     * Gets a password
     *
     * @return string
     */
    public function getPassword(): string
    {
        return $this->password;
    }

    /**
     * Sets a key
     *
     * @param string $key
     * @return PrivateCertificate
     */
    public function setKey(string $key): PrivateCertificate
    {
        $this->key = $key;
        return $this;
    }

    /**
     * Sets a password
     *
     * @param string $password
     * @return PrivateCertificate
     */
    public function setPassword(string $password): PrivateCertificate
    {
        $this->password = $password;
        return $this;
    }
}