Aleksander Machniak
2016-03-28 46f7b7096450939fe03c95aa81ce06ae4bfca89d
plugins/enigma/lib/enigma_driver.php
@@ -33,11 +33,16 @@
    /**
     * Encryption.
     *
     * @param string Message body
     * @param array  List of key-password mapping
     *
     * @return mixed Encrypted message or enigma_error on failure
     */
    abstract function encrypt($text, $keys);
    /**
     * Decryption..
     * Decryption.
     *
     * @param string Encrypted message
     * @param array  List of key-password mapping
@@ -46,6 +51,13 @@
    /**
     * Signing.
     *
     * @param string Message body
     * @param string Key ID
     * @param string Key password
     * @param int    Signing mode (enigma_engine::SIGN_*)
     *
     * @return mixed True on success or enigma_error on failure
     */
    abstract function sign($text, $key, $passwd, $mode = null);
@@ -68,6 +80,15 @@
     * @return mixed Import status array or enigma_error
     */
    abstract function import($content, $isfile = false);
    /**
     * Key/Cert export.
     *
     * @param string Key ID
     *
     * @return mixed Key content or enigma_error
     */
    abstract function export($key);
    /**
     * Keys listing.
@@ -98,6 +119,10 @@
    /**
     * Key deletion.
     *
     * @param string Key ID
     *
     * @return mixed True on success or enigma_error
     */
    abstract function delete_key($keyid);
}