PHP API Key Generator

前端 未结 9 613
天命终不由人
天命终不由人 2020-12-04 09:21

Does anyone know of any API key generator script/class for PHP? The class should have method generate, that would generate a key and isValid() method, to check if the key is

9条回答
  •  囚心锁ツ
    2020-12-04 09:48

    just use something like this (pseudo code) sha1(salt + time + mac-addr + another salt + some other random data) crc32 or md5 would also work inestead of sha1 and store it in a database and then isValid() checks the db if the key exists?

提交回复
热议问题