public function generateOneTime($initKey = null, $timestamp = null)
    {
        $initKey = ($initKey == null) ? $this->getInitKey() : $initKey;
        $timestamp = ($timestamp == null) ? $this->generateTimestamp() : $timestamp;

        $hash = hash_hmac (
            'sha1',
            pack('N*', 0) . pack('N*', $timestamp),
            $initKey,
            true
        );

        return str_pad($this->truncateHash($hash), $this->getCodeLength(), '0', STR_PAD_LEFT);
    }