def pbkdf2(password, salt, iter, keylen): # type: (bytes, bytes, int, int) -> bytes """ Derive a key from password using PBKDF2 algorithm specified in RFC 2898. @param password: Derive the key from this password. @param salt: Salt. @param iter: Number of iterations to perform. @param keylen: Length of key to produce. @return: Key. """ return m2.pkcs5_pbkdf2_hmac_sha1(password, salt, iter, keylen)
def pbkdf2(password, salt, iter, keylen): # type: (bytes, bytes, int, int) -> bytes """ Derive a key from password using PBKDF2 algorithm specified in RFC 2898. :param password: Derive the key from this password. :param salt: Salt. :param iter: Number of iterations to perform. :param keylen: Length of key to produce. :return: Key. """ return m2.pkcs5_pbkdf2_hmac_sha1(password, salt, iter, keylen)
def pbkdf2(password, salt, iter, keylen): """ Derive a key from password using PBKDF2 algorithm specified in RFC 2898. @param password: Derive the key from this password. @type password: str @param salt: Salt. @type salt: str @param iter: Number of iterations to perform. @type iter: int @param keylen: Length of key to produce. @type keylen: int @return: Key. @rtype: str """ return m2.pkcs5_pbkdf2_hmac_sha1(password, salt, iter, keylen)