X-Git-Url: https://git.stricted.de/?p=GitHub%2FStricted%2Fspeedport-hybrid-php-api.git;a=blobdiff_plain;f=CryptLib%2FKey%2FDerivation%2FKDF.php;fp=CryptLib%2FKey%2FDerivation%2FKDF.php;h=5d7a26efc4965e9511b1661895d2f1d9f4087f80;hp=0000000000000000000000000000000000000000;hb=14d4f286d33b631a93207e4d13086c0a3bc0df12;hpb=c9e082da5cc662b64a74d3770f13d1270068678f diff --git a/CryptLib/Key/Derivation/KDF.php b/CryptLib/Key/Derivation/KDF.php new file mode 100644 index 0000000..5d7a26e --- /dev/null +++ b/CryptLib/Key/Derivation/KDF.php @@ -0,0 +1,40 @@ + + * @copyright 2011 The Authors + * @license http://www.opensource.org/licenses/mit-license.html MIT Licenses + * @version Build @@version@@ + */ + +namespace CryptLib\Key\Derivation; + +/** + * The standard Key Derivation Function interface + * + * @category PHPCryptLib + * @package Key + * @subpackage Derivation + * @author Anthony Ferrara + * @codeCoverageIgnore + */ +interface KDF { + + /** + * Derive a key of the specified length based on the inputted secret + * + * @param string $secret The secret to base the key on + * @param int $length The length of the key to derive + * @param string $other Additional data to append to the key + * + * @return string The generated key + */ + public function derive($secret, $length, $other = ''); + +}