relicensed util/ and moved rsaes to crypto/

This commit is contained in:
csoler 2018-05-30 21:34:38 +02:00
parent 858dcfc14c
commit 8641da189c
No known key found for this signature in database
GPG Key ID: 7BCA522266C0804C
23 changed files with 448 additions and 448 deletions

View File

@ -1,28 +1,24 @@
/* /*******************************************************************************
* libretroshare/src/utils: rsaes.cc * libretroshare/src/util: rsaes.cc *
* * *
* AES crptography for RetroShare. * libretroshare: retroshare core library *
* * *
* Copyright 2013 by Cyril Soler * Copyright 2013-2013 Cyril Soler <csoler@users.sourceforge.net> *
* * *
* This library is free software; you can redistribute it and/or * This program is free software: you can redistribute it and/or modify *
* modify it under the terms of the GNU Library General Public * it under the terms of the GNU Lesser General Public License as *
* License Version 2 as published by the Free Software Foundation. * published by the Free Software Foundation, either version 3 of the *
* * License, or (at your option) any later version. *
* This library is distributed in the hope that it will be useful, * *
* but WITHOUT ANY WARRANTY; without even the implied warranty of * This program is distributed in the hope that it will be useful, *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * but WITHOUT ANY WARRANTY; without even the implied warranty of *
* Library General Public License for more details. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* * GNU Lesser General Public License for more details. *
* You should have received a copy of the GNU Library General Public * *
* License along with this library; if not, write to the Free Software * You should have received a copy of the GNU Lesser General Public License *
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * along with this program. If not, see <https://www.gnu.org/licenses/>. *
* USA. * *
* *******************************************************************************/
* Please report all bugs and problems to "csoler@users.sourceforge.net".
*
*/
#include <iostream> #include <iostream>
#include <openssl/evp.h> #include <openssl/evp.h>
#include <openssl/aes.h> #include <openssl/aes.h>

View File

@ -0,0 +1,43 @@
/*******************************************************************************
* libretroshare/src/util: rsaes.h *
* *
* libretroshare: retroshare core library *
* *
* Copyright 2013-2013 Cyril Soler <csoler@users.sourceforge.net> *
* *
* This program is free software: you can redistribute it and/or modify *
* it under the terms of the GNU Lesser General Public License as *
* published by the Free Software Foundation, either version 3 of the *
* License, or (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU Lesser General Public License for more details. *
* *
* You should have received a copy of the GNU Lesser General Public License *
* along with this program. If not, see <https://www.gnu.org/licenses/>. *
* *
*******************************************************************************/
#include <stdint.h>
class RsAES
{
public:
// Crypt/decrypt data using a 16 bytes key and a 8 bytes salt.
//
// output_data allocation is left to the client. The size should be at least RsAES::get_buffer_size(input_data_length)
//
// Return value:
// true: encryption/decryption ok
//
// false: encryption/decryption went bad. Check buffer size.
//
static bool aes_crypt_8_16(const uint8_t *input_data,uint32_t input_data_length,uint8_t key[16],uint8_t salt[8],uint8_t *output_data,uint32_t& output_data_length) ;
static bool aes_decrypt_8_16(const uint8_t *input_data,uint32_t input_data_length,uint8_t key[16],uint8_t salt[8],uint8_t *output_data,uint32_t& output_data_length) ;
// computes the safe buffer size to store encrypted/decrypted data for the given input stream size
//
static uint32_t get_buffer_size(uint32_t size) ;
};

View File

@ -391,7 +391,8 @@ HEADERS += ft/ftchunkmap.h \
ft/ftturtlefiletransferitem.h ft/ftturtlefiletransferitem.h
HEADERS += crypto/chacha20.h \ HEADERS += crypto/chacha20.h \
crypto/hashstream.h crypto/rsaes.h \
crypto/hashstream.h
HEADERS += directory_updater.h \ HEADERS += directory_updater.h \
directory_list.h \ directory_list.h \
@ -406,7 +407,6 @@ HEADERS += pqi/authssl.h \
pqi/authgpg.h \ pqi/authgpg.h \
pgp/pgphandler.h \ pgp/pgphandler.h \
pgp/pgpkeyutil.h \ pgp/pgpkeyutil.h \
pgp/rsaes.h \
pgp/rscertificate.h \ pgp/rscertificate.h \
pgp/pgpauxutils.h \ pgp/pgpauxutils.h \
pqi/p3cfgmgr.h \ pqi/p3cfgmgr.h \
@ -556,7 +556,8 @@ SOURCES += ft/ftchunkmap.cc \
ft/ftturtlefiletransferitem.cc ft/ftturtlefiletransferitem.cc
SOURCES += crypto/chacha20.cpp \ SOURCES += crypto/chacha20.cpp \
crypto/hashstream.cc crypto/rsaes.cc \
crypto/hashstream.cc
SOURCES += chat/distantchat.cc \ SOURCES += chat/distantchat.cc \
chat/p3chatservice.cc \ chat/p3chatservice.cc \
@ -682,8 +683,6 @@ SOURCES += util/folderiterator.cc \
util/rsstring.cc \ util/rsstring.cc \
util/rsthreads.cc \ util/rsthreads.cc \
util/rsversioninfo.cc \ util/rsversioninfo.cc \
util/rswin.cc \
util/rsaes.cc \
util/rsrandom.cc \ util/rsrandom.cc \
util/rstickevent.cc \ util/rstickevent.cc \
util/rsrecogn.cc \ util/rsrecogn.cc \

View File

@ -1,47 +0,0 @@
/*
* libretroshare/src/utils: rsaescrypt.h
*
* AES crptography for RetroShare.
*
* Copyright 2013 by Cyril Soler
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License Version 2 as published by the Free Software Foundation.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
* USA.
*
* Please report all bugs and problems to "csoler@users.sourceforge.net".
*
*/
#include <stdint.h>
class RsAES
{
public:
// Crypt/decrypt data using a 16 bytes key and a 8 bytes salt.
//
// output_data allocation is left to the client. The size should be at least RsAES::get_buffer_size(input_data_length)
//
// Return value:
// true: encryption/decryption ok
//
// false: encryption/decryption went bad. Check buffer size.
//
static bool aes_crypt_8_16(const uint8_t *input_data,uint32_t input_data_length,uint8_t key[16],uint8_t salt[8],uint8_t *output_data,uint32_t& output_data_length) ;
static bool aes_decrypt_8_16(const uint8_t *input_data,uint32_t input_data_length,uint8_t key[16],uint8_t salt[8],uint8_t *output_data,uint32_t& output_data_length) ;
// computes the safe buffer size to store encrypted/decrypted data for the given input stream size
//
static uint32_t get_buffer_size(uint32_t size) ;
};

View File

@ -1,28 +1,25 @@
/* /*******************************************************************************
* libretroshare/src/util: rsnet_ss.cc * libretroshare/src/util: rsnet_ss.cc *
* * *
* sockaddr_storage functions for RetroShare. * libretroshare: retroshare core library *
* * *
* Copyright 2013-2013 by Robert Fernie. * Copyright 2004-2006 Robert Fernie <retroshare@lunamutt.com> *
* Copyright (C) 2015-2018 Gioacchino Mazzurco <gio@eigenlab.org> * Copyright 2015-2018 Gioacchino Mazzurco <gio@eigenlab.org> *
* * *
* This library is free software; you can redistribute it and/or * This program is free software: you can redistribute it and/or modify *
* modify it under the terms of the GNU Library General Public * it under the terms of the GNU Lesser General Public License as *
* License Version 2.1 as published by the Free Software Foundation. * published by the Free Software Foundation, either version 3 of the *
* * License, or (at your option) any later version. *
* This library is distributed in the hope that it will be useful, * *
* but WITHOUT ANY WARRANTY; without even the implied warranty of * This program is distributed in the hope that it will be useful, *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * but WITHOUT ANY WARRANTY; without even the implied warranty of *
* Library General Public License for more details. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* * GNU Lesser General Public License for more details. *
* You should have received a copy of the GNU Library General Public * *
* License along with this library; if not, write to the Free Software * You should have received a copy of the GNU Lesser General Public License *
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * along with this program. If not, see <https://www.gnu.org/licenses/>. *
* USA. * *
* *******************************************************************************/
* Please report all bugs and problems to "retroshare@lunamutt.com".
*
*/
#include <sstream> #include <sstream>
#include <iomanip> #include <iomanip>

View File

@ -1,28 +1,24 @@
/* /*******************************************************************************
* libretroshare/src/util: rsrecogn.cc * libretroshare/src/util: rsrandom.h *
* * *
* RetroShare Utilities * libretroshare: retroshare core library *
* * *
* Copyright 2013 by Robert Fernie. * Copyright (C) 2013 Robert Fernie <retroshare@lunamutt.com> *
* * *
* This library is free software; you can redistribute it and/or * This program is free software: you can redistribute it and/or modify *
* modify it under the terms of the GNU Library General Public * it under the terms of the GNU Lesser General Public License as *
* License Version 2.1 as published by the Free Software Foundation. * published by the Free Software Foundation, either version 3 of the *
* * License, or (at your option) any later version. *
* This library is distributed in the hope that it will be useful, * *
* but WITHOUT ANY WARRANTY; without even the implied warranty of * This program is distributed in the hope that it will be useful, *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * but WITHOUT ANY WARRANTY; without even the implied warranty of *
* Library General Public License for more details. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* * GNU Lesser General Public License for more details. *
* You should have received a copy of the GNU Library General Public * *
* License along with this library; if not, write to the Free Software * You should have received a copy of the GNU Lesser General Public License *
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * along with this program. If not, see <https://www.gnu.org/licenses/>. *
* USA. * *
* *******************************************************************************/
* Please report all bugs and problems to "retroshare@lunamutt.com".
*
*/
#include "pqi/pqi_base.h" #include "pqi/pqi_base.h"
#include "util/rsrecogn.h" #include "util/rsrecogn.h"

View File

@ -1,29 +1,24 @@
/*******************************************************************************
/* * libretroshare/src/util: rsrandom.h *
* libretroshare/src/util: rsrecogn.h * *
* * libretroshare: retroshare core library *
* RetroShare Utilities * *
* * Copyright (C) 2013 Robert Fernie <retroshare@lunamutt.com> *
* Copyright 2013 by Robert Fernie. * *
* * This program is free software: you can redistribute it and/or modify *
* This library is free software; you can redistribute it and/or * it under the terms of the GNU Lesser General Public License as *
* modify it under the terms of the GNU Library General Public * published by the Free Software Foundation, either version 3 of the *
* License Version 2.1 as published by the Free Software Foundation. * License, or (at your option) any later version. *
* * *
* This library is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* Library General Public License for more details. * GNU Lesser General Public License for more details. *
* * *
* You should have received a copy of the GNU Library General Public * You should have received a copy of the GNU Lesser General Public License *
* License along with this library; if not, write to the Free Software * along with this program. If not, see <https://www.gnu.org/licenses/>. *
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * *
* USA. *******************************************************************************/
*
* Please report all bugs and problems to "retroshare@lunamutt.com".
*
*/
#ifndef RSUTIL_RECOGN_H #ifndef RSUTIL_RECOGN_H
#define RSUTIL_RECOGN_H #define RSUTIL_RECOGN_H

View File

@ -1,24 +1,24 @@
/**************************************************************** /*******************************************************************************
* This file is distributed under the following license: * libretroshare/src/util: rsstd.h *
* * *
* Copyright (c) 2015, RetroShare Team * libretroshare: retroshare core library *
* * *
* This program is free software; you can redistribute it and/or * Copyright (C) 2015 Retroshare Team <retroshare.team@gmail.com> *
* modify it under the terms of the GNU General Public License * *
* as published by the Free Software Foundation; either version 2 * This program is free software: you can redistribute it and/or modify *
* of the License, or (at your option) any later version. * it under the terms of the GNU Lesser General Public License as *
* * published by the Free Software Foundation, either version 3 of the *
* This program is distributed in the hope that it will be useful, * License, or (at your option) any later version. *
* but WITHOUT ANY WARRANTY; without even the implied warranty of * *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * This program is distributed in the hope that it will be useful, *
* GNU General Public License for more details. * but WITHOUT ANY WARRANTY; without even the implied warranty of *
* * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* You should have received a copy of the GNU General Public License * GNU Lesser General Public License for more details. *
* along with this program; if not, write to the Free Software * *
* Foundation, Inc., 51 Franklin Street, Fifth Floor, * You should have received a copy of the GNU Lesser General Public License *
* Boston, MA 02110-1301, USA. * along with this program. If not, see <https://www.gnu.org/licenses/>. *
****************************************************************/ * *
*******************************************************************************/
#ifndef RSSTD_H_ #ifndef RSSTD_H_
#define RSSTD_H_ #define RSSTD_H_

View File

@ -1,24 +1,24 @@
/**************************************************************** /*******************************************************************************
* This file is distributed under the following license: * libretroshare/src/util: rsstd.h *
* * *
* Copyright (c) 2010, Thomas Kister * libretroshare: retroshare core library *
* * *
* This program is free software; you can redistribute it and/or * Copyright (c) 2010, Thomas Kister *
* modify it under the terms of the GNU General Public License * *
* as published by the Free Software Foundation; either version 2 * This program is free software: you can redistribute it and/or modify *
* of the License, or (at your option) any later version. * it under the terms of the GNU Lesser General Public License as *
* * published by the Free Software Foundation, either version 3 of the *
* This program is distributed in the hope that it will be useful, * License, or (at your option) any later version. *
* but WITHOUT ANY WARRANTY; without even the implied warranty of * *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * This program is distributed in the hope that it will be useful, *
* GNU General Public License for more details. * but WITHOUT ANY WARRANTY; without even the implied warranty of *
* * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* You should have received a copy of the GNU General Public License * GNU Lesser General Public License for more details. *
* along with this program; if not, write to the Free Software * *
* Foundation, Inc., 51 Franklin Street, Fifth Floor, * You should have received a copy of the GNU Lesser General Public License *
* Boston, MA 02110-1301, USA. * along with this program. If not, see <https://www.gnu.org/licenses/>. *
****************************************************************/ * *
*******************************************************************************/
#include "rsstring.h" #include "rsstring.h"
#ifdef WINDOWS_SYS #ifdef WINDOWS_SYS

View File

@ -1,24 +1,24 @@
/**************************************************************** /*******************************************************************************
* This file is distributed under the following license: * libretroshare/src/util: rsstd.h *
* * *
* Copyright (c) 2010, Thomas Kister * libretroshare: retroshare core library *
* * *
* This program is free software; you can redistribute it and/or * Copyright (c) 2010, Thomas Kister *
* modify it under the terms of the GNU General Public License * *
* as published by the Free Software Foundation; either version 2 * This program is free software: you can redistribute it and/or modify *
* of the License, or (at your option) any later version. * it under the terms of the GNU Lesser General Public License as *
* * published by the Free Software Foundation, either version 3 of the *
* This program is distributed in the hope that it will be useful, * License, or (at your option) any later version. *
* but WITHOUT ANY WARRANTY; without even the implied warranty of * *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * This program is distributed in the hope that it will be useful, *
* GNU General Public License for more details. * but WITHOUT ANY WARRANTY; without even the implied warranty of *
* * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* You should have received a copy of the GNU General Public License * GNU Lesser General Public License for more details. *
* along with this program; if not, write to the Free Software * *
* Foundation, Inc., 51 Franklin Street, Fifth Floor, * You should have received a copy of the GNU Lesser General Public License *
* Boston, MA 02110-1301, USA. * along with this program. If not, see <https://www.gnu.org/licenses/>. *
****************************************************************/ * *
*******************************************************************************/
#ifndef RSSTRING_H_ #ifndef RSSTRING_H_
#define RSSTRING_H_ #define RSSTRING_H_

View File

@ -1,28 +1,24 @@
/*******************************************************************************
/* * libretroshare/src/util: rsthreads.cc *
* "$Id: rsthreads.cc,v 1.1 2007-02-19 20:08:30 rmf24 Exp $" * *
* * libretroshare: retroshare core library *
* RetroShare C++ Interface. * *
* * Copyright 2004-2007 by Robert Fernie <retroshare@lunamutt.com> *
* Copyright 2004-2007 by Robert Fernie. * *
* * This program is free software: you can redistribute it and/or modify *
* This library is free software; you can redistribute it and/or * it under the terms of the GNU Lesser General Public License as *
* modify it under the terms of the GNU Library General Public * published by the Free Software Foundation, either version 3 of the *
* License Version 2 as published by the Free Software Foundation. * License, or (at your option) any later version. *
* * *
* This library is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* Library General Public License for more details. * GNU Lesser General Public License for more details. *
* * *
* You should have received a copy of the GNU Library General Public * You should have received a copy of the GNU Lesser General Public License *
* License along with this library; if not, write to the Free Software * along with this program. If not, see <https://www.gnu.org/licenses/>. *
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * *
* USA. *******************************************************************************/
*
* Please report all bugs and problems to "retroshare@lunamutt.com".
*
*/
#include "rsthreads.h" #include "rsthreads.h"
#include <unistd.h> // for usleep() #include <unistd.h> // for usleep()

View File

@ -1,28 +1,24 @@
/* /*******************************************************************************
* "$Id: rsthreads.h,v 1.1 2007-02-19 20:08:30 rmf24 Exp $" * libretroshare/src/util: rsthreads.h *
* * *
* RetroShare C++ Interface. * libretroshare: retroshare core library *
* * *
* Copyright 2004-2006 by Robert Fernie. * Copyright 2004-2006 by Robert Fernie <retroshare@lunamutt.com> *
* * *
* This library is free software; you can redistribute it and/or * This program is free software: you can redistribute it and/or modify *
* modify it under the terms of the GNU Library General Public * it under the terms of the GNU Lesser General Public License as *
* License Version 2 as published by the Free Software Foundation. * published by the Free Software Foundation, either version 3 of the *
* * License, or (at your option) any later version. *
* This library is distributed in the hope that it will be useful, * *
* but WITHOUT ANY WARRANTY; without even the implied warranty of * This program is distributed in the hope that it will be useful, *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * but WITHOUT ANY WARRANTY; without even the implied warranty of *
* Library General Public License for more details. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* * GNU Lesser General Public License for more details. *
* You should have received a copy of the GNU Library General Public * *
* License along with this library; if not, write to the Free Software * You should have received a copy of the GNU Lesser General Public License *
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * along with this program. If not, see <https://www.gnu.org/licenses/>. *
* USA. * *
* *******************************************************************************/
* Please report all bugs and problems to "retroshare@lunamutt.com".
*
*/
#pragma once #pragma once
#include <pthread.h> #include <pthread.h>

View File

@ -1,28 +1,24 @@
/* /*******************************************************************************
* libretroshare/src/util: rstickevent.cc * libretroshare/src/util: rstickevent.cc *
* * *
* Identity interface for RetroShare. * libretroshare: retroshare core library *
* * *
* Copyright 2012-2012 by Robert Fernie. * Copyright 2012-2012 by Robert Fernie <retroshare@lunamutt.com> *
* * *
* This library is free software; you can redistribute it and/or * This program is free software: you can redistribute it and/or modify *
* modify it under the terms of the GNU Library General Public * it under the terms of the GNU Lesser General Public License as *
* License Version 2.1 as published by the Free Software Foundation. * published by the Free Software Foundation, either version 3 of the *
* * License, or (at your option) any later version. *
* This library is distributed in the hope that it will be useful, * *
* but WITHOUT ANY WARRANTY; without even the implied warranty of * This program is distributed in the hope that it will be useful, *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * but WITHOUT ANY WARRANTY; without even the implied warranty of *
* Library General Public License for more details. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* * GNU Lesser General Public License for more details. *
* You should have received a copy of the GNU Library General Public * *
* License along with this library; if not, write to the Free Software * You should have received a copy of the GNU Lesser General Public License *
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * along with this program. If not, see <https://www.gnu.org/licenses/>. *
* USA. * *
* *******************************************************************************/
* Please report all bugs and problems to "retroshare@lunamutt.com".
*
*/
#include "util/rstickevent.h" #include "util/rstickevent.h"
#include <iostream> #include <iostream>

View File

@ -1,27 +1,24 @@
/* /*******************************************************************************
* libretroshare/src/util: rstickevent.h * libretroshare/src/util: rstickevent.h *
* * *
* Identity interface for RetroShare. * libretroshare: retroshare core library *
* * *
* Copyright 2012-2012 by Robert Fernie. * Copyright 2012-2012 by Robert Fernie <retroshare@lunamutt.com> *
* * *
* This library is free software; you can redistribute it and/or * This program is free software: you can redistribute it and/or modify *
* modify it under the terms of the GNU Library General Public * it under the terms of the GNU Lesser General Public License as *
* License Version 2.1 as published by the Free Software Foundation. * published by the Free Software Foundation, either version 3 of the *
* * License, or (at your option) any later version. *
* This library is distributed in the hope that it will be useful, * *
* but WITHOUT ANY WARRANTY; without even the implied warranty of * This program is distributed in the hope that it will be useful, *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * but WITHOUT ANY WARRANTY; without even the implied warranty of *
* Library General Public License for more details. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* * GNU Lesser General Public License for more details. *
* You should have received a copy of the GNU Library General Public * *
* License along with this library; if not, write to the Free Software * You should have received a copy of the GNU Lesser General Public License *
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * along with this program. If not, see <https://www.gnu.org/licenses/>. *
* USA. * *
* *******************************************************************************/
* Please report all bugs and problems to "retroshare@lunamutt.com".
*
*/
#ifndef RS_UTIL_TICK_EVENT #ifndef RS_UTIL_TICK_EVENT
#define RS_UTIL_TICK_EVENT #define RS_UTIL_TICK_EVENT

View File

@ -1,28 +1,24 @@
/* /*******************************************************************************
* libretroshare/src/util: rsscopetimer.cc * libretroshare/src/util: rstime.cc *
* * *
* 3P/PQI network interface for RetroShare. * libretroshare: retroshare core library *
* * *
* Copyright 2013- by Cyril Soler * Copyright 2013-2013 by Cyril Soler <csoler@users.sourceforge.net> *
* * *
* This library is free software; you can redistribute it and/or * This program is free software: you can redistribute it and/or modify *
* modify it under the terms of the GNU Library General Public * it under the terms of the GNU Lesser General Public License as *
* License Version 2 as published by the Free Software Foundation. * published by the Free Software Foundation, either version 3 of the *
* * License, or (at your option) any later version. *
* This library is distributed in the hope that it will be useful, * *
* but WITHOUT ANY WARRANTY; without even the implied warranty of * This program is distributed in the hope that it will be useful, *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * but WITHOUT ANY WARRANTY; without even the implied warranty of *
* Library General Public License for more details. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* * GNU Lesser General Public License for more details. *
* You should have received a copy of the GNU Library General Public * *
* License along with this library; if not, write to the Free Software * You should have received a copy of the GNU Lesser General Public License *
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * along with this program. If not, see <https://www.gnu.org/licenses/>. *
* USA. * *
* *******************************************************************************/
* Please report all bugs and problems to "retroshare@lunamutt.com".
*
*/
#include <iostream> #include <iostream>
#include <thread> #include <thread>
#include <sys/time.h> #include <sys/time.h>

View File

@ -1,28 +1,24 @@
/* /*******************************************************************************
* libretroshare/src/util: rsscopetimer.h * libretroshare/src/util: rstime.h *
* * *
* 3P/PQI network interface for RetroShare. * libretroshare: retroshare core library *
* * *
* Copyright 2013- by Cyril Soler * Copyright 2013-2013 by Cyril Soler <csoler@users.sourceforge.net> *
* * *
* This library is free software; you can redistribute it and/or * This program is free software: you can redistribute it and/or modify *
* modify it under the terms of the GNU Library General Public * it under the terms of the GNU Lesser General Public License as *
* License Version 2 as published by the Free Software Foundation. * published by the Free Software Foundation, either version 3 of the *
* * License, or (at your option) any later version. *
* This library is distributed in the hope that it will be useful, * *
* but WITHOUT ANY WARRANTY; without even the implied warranty of * This program is distributed in the hope that it will be useful, *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * but WITHOUT ANY WARRANTY; without even the implied warranty of *
* Library General Public License for more details. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* * GNU Lesser General Public License for more details. *
* You should have received a copy of the GNU Library General Public * *
* License along with this library; if not, write to the Free Software * You should have received a copy of the GNU Lesser General Public License *
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * along with this program. If not, see <https://www.gnu.org/licenses/>. *
* USA. * *
* *******************************************************************************/
* Please report all bugs and problems to "retroshare@lunamutt.com".
*
*/
#include <string> #include <string>
namespace rstime { namespace rstime {

View File

@ -1,10 +1,24 @@
/* /*******************************************************************************
* rsversion.cc * libretroshare/src/util: rsversioninfo.cc *
* * *
* Created on: Jun 23, 2009 * libretroshare: retroshare core library *
* Author: alexandrut * *
*/ * Copyright 2013-2013 by Alexandrut *
* *
* This program is free software: you can redistribute it and/or modify *
* it under the terms of the GNU Lesser General Public License as *
* published by the Free Software Foundation, either version 3 of the *
* License, or (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU Lesser General Public License for more details. *
* *
* You should have received a copy of the GNU Lesser General Public License *
* along with this program. If not, see <https://www.gnu.org/licenses/>. *
* *
*******************************************************************************/
#include "rsversioninfo.h" #include "rsversioninfo.h"
#include "retroshare/rsversion.h" #include "retroshare/rsversion.h"
#include "rsstring.h" #include "rsstring.h"

View File

@ -1,10 +1,24 @@
/* /*******************************************************************************
* rsversion.h * libretroshare/src/util: rsversioninfo.h *
* * *
* Created on: Jun 23, 2009 * libretroshare: retroshare core library *
* Author: alexandrut * *
*/ * Copyright 2013-2013 by Alexandrut *
* *
* This program is free software: you can redistribute it and/or modify *
* it under the terms of the GNU Lesser General Public License as *
* published by the Free Software Foundation, either version 3 of the *
* License, or (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU Lesser General Public License for more details. *
* *
* You should have received a copy of the GNU Lesser General Public License *
* along with this program. If not, see <https://www.gnu.org/licenses/>. *
* *
*******************************************************************************/
#include <string> #include <string>
#include <inttypes.h> #include <inttypes.h>

View File

@ -1 +0,0 @@
#include "util/rswin.h"

View File

@ -1,24 +1,24 @@
/**************************************************************** /*******************************************************************************
* This file is distributed under the following license: * libretroshare/src/util: rswin.h *
* * *
* Copyright (c) 2010, Thomas Kister * libretroshare: retroshare core library *
* * *
* This program is free software; you can redistribute it and/or * Copyright (c) 2010, Thomas Kister *
* modify it under the terms of the GNU General Public License * *
* as published by the Free Software Foundation; either version 2 * This program is free software: you can redistribute it and/or modify *
* of the License, or (at your option) any later version. * it under the terms of the GNU Lesser General Public License as *
* * published by the Free Software Foundation, either version 3 of the *
* This program is distributed in the hope that it will be useful, * License, or (at your option) any later version. *
* but WITHOUT ANY WARRANTY; without even the implied warranty of * *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * This program is distributed in the hope that it will be useful, *
* GNU General Public License for more details. * but WITHOUT ANY WARRANTY; without even the implied warranty of *
* * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* You should have received a copy of the GNU General Public License * GNU Lesser General Public License for more details. *
* along with this program; if not, write to the Free Software * *
* Foundation, Inc., 51 Franklin Street, Fifth Floor, * You should have received a copy of the GNU Lesser General Public License *
* Boston, MA 02110-1301, USA. * along with this program. If not, see <https://www.gnu.org/licenses/>. *
****************************************************************/ * *
*******************************************************************************/
/** /**
* This file provides helper functions for the windows environment * This file provides helper functions for the windows environment

View File

@ -1,3 +1,24 @@
/*******************************************************************************
* libretroshare/src/util: smallobject.cc *
* *
* libretroshare: retroshare core library *
* *
* Copyright (c) 2011, Cyril Soler <csoler@users.sourceforge.net> *
* *
* This program is free software: you can redistribute it and/or modify *
* it under the terms of the GNU Lesser General Public License as *
* published by the Free Software Foundation, either version 3 of the *
* License, or (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU Lesser General Public License for more details. *
* *
* You should have received a copy of the GNU Lesser General Public License *
* along with this program. If not, see <https://www.gnu.org/licenses/>. *
* *
*******************************************************************************/
#include <iostream> #include <iostream>
#include "smallobject.h" #include "smallobject.h"
#include "util/rsthreads.h" #include "util/rsthreads.h"

View File

@ -1,28 +1,24 @@
/* /*******************************************************************************
* libretroshare/src/util: smallobject.h * libretroshare/src/util: smallobject.h *
* * *
* Universal Networking Header for RetroShare. * libretroshare: retroshare core library *
* * *
* Copyright 2011 by Cyril Soler * Copyright (c) 2011, Cyril Soler <csoler@users.sourceforge.net> *
* * *
* This library is free software; you can redistribute it and/or * This program is free software: you can redistribute it and/or modify *
* modify it under the terms of the GNU Library General Public * it under the terms of the GNU Lesser General Public License as *
* License Version 2 as published by the Free Software Foundation. * published by the Free Software Foundation, either version 3 of the *
* * License, or (at your option) any later version. *
* This library is distributed in the hope that it will be useful, * *
* but WITHOUT ANY WARRANTY; without even the implied warranty of * This program is distributed in the hope that it will be useful, *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * but WITHOUT ANY WARRANTY; without even the implied warranty of *
* Library General Public License for more details. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* * GNU Lesser General Public License for more details. *
* You should have received a copy of the GNU Library General Public * *
* License along with this library; if not, write to the Free Software * You should have received a copy of the GNU Lesser General Public License *
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * along with this program. If not, see <https://www.gnu.org/licenses/>. *
* USA. * *
* *******************************************************************************/
* Please report all bugs and problems to "cyril.soler@users.sourceforge.net".
*
*/
#pragma once #pragma once
#include <stdlib.h> #include <stdlib.h>

View File

@ -1,25 +1,25 @@
/* /*******************************************************************************
* stacktrace.h * libretroshare/src/util: smallobject.h *
* * *
* Copyright (C) 2016 Gioacchino Mazzurco <gio@eigenlab.org> * libretroshare: retroshare core library *
* Copyright (C) 2008 Timo Bingmann http://idlebox.net/ * *
* * Copyright (C) 2016 Gioacchino Mazzurco <gio@eigenlab.org> *
* This library is free software; you can redistribute it and/or * Copyright (C) 2008 Timo Bingmann http://idlebox.net/ *
* modify it under the terms of the GNU Library General Public * *
* License Version 2 as published by the Free Software Foundation. * This program is free software: you can redistribute it and/or modify *
* * it under the terms of the GNU Lesser General Public License as *
* This library is distributed in the hope that it will be useful, * published by the Free Software Foundation, either version 3 of the *
* but WITHOUT ANY WARRANTY; without even the implied warranty of * License, or (at your option) any later version. *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * *
* Library General Public License for more details. * This program is distributed in the hope that it will be useful, *
* * but WITHOUT ANY WARRANTY; without even the implied warranty of *
* You should have received a copy of the GNU Library General Public * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* License along with this library; if not, write to the Free Software * GNU Lesser General Public License for more details. *
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * *
* USA. * You should have received a copy of the GNU Lesser General Public License *
* * along with this program. If not, see <https://www.gnu.org/licenses/>. *
*/ * *
*******************************************************************************/
#ifndef _STACKTRACE_H_ #ifndef _STACKTRACE_H_
#define _STACKTRACE_H_ #define _STACKTRACE_H_