private static function sign_auth_key($auth_key) { if (self::is_production()) { return AppIdentityService::signForApp($auth_key); } else { // In the development server we are not concerned with trying to generate // a secure signature. return ['key_name' => 'development_hash', 'signature' => sha1($auth_key)]; } }
public function testInvalidBytesToSign() { $this->setExpectedException('\\InvalidArgumentException'); $sign_result = AppIdentityService::signForApp(1.0); }