Skip to content

Commit

Permalink
Merging and preparing to send to main repo.
Browse files Browse the repository at this point in the history
  • Loading branch information
rafaelthca committed Apr 17, 2019
2 parents a8a547a + aeb2db4 commit 7a3f541
Show file tree
Hide file tree
Showing 69 changed files with 172,308 additions and 46,901 deletions.
4 changes: 2 additions & 2 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
MIT License

Portions Copyright (c) 2015-2018, The OmniDB Team
Portions Copyright (c) 2017-2018, 2ndQuadrant Limited
Portions Copyright (c) 2015-2019, The OmniDB Team
Portions Copyright (c) 2017-2019, 2ndQuadrant Limited

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
4 changes: 2 additions & 2 deletions OmniDB/OmniDB_app/include/OmniDatabase/MariaDB.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
'''
The MIT License (MIT)
Portions Copyright (c) 2015-2018, The OmniDB Team
Portions Copyright (c) 2017-2018, 2ndQuadrant Limited
Portions Copyright (c) 2015-2019, The OmniDB Team
Portions Copyright (c) 2017-2019, 2ndQuadrant Limited
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
4 changes: 2 additions & 2 deletions OmniDB/OmniDB_app/include/OmniDatabase/MySQL.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
'''
The MIT License (MIT)
Portions Copyright (c) 2015-2018, The OmniDB Team
Portions Copyright (c) 2017-2018, 2ndQuadrant Limited
Portions Copyright (c) 2015-2019, The OmniDB Team
Portions Copyright (c) 2017-2019, 2ndQuadrant Limited
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
4 changes: 2 additions & 2 deletions OmniDB/OmniDB_app/include/OmniDatabase/Oracle.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
'''
The MIT License (MIT)
Portions Copyright (c) 2015-2018, The OmniDB Team
Portions Copyright (c) 2017-2018, 2ndQuadrant Limited
Portions Copyright (c) 2015-2019, The OmniDB Team
Portions Copyright (c) 2017-2019, 2ndQuadrant Limited
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
407 changes: 370 additions & 37 deletions OmniDB/OmniDB_app/include/OmniDatabase/PostgreSQL.py

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions OmniDB/OmniDB_app/include/OmniDatabase/SQLite.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
'''
The MIT License (MIT)
Portions Copyright (c) 2015-2018, The OmniDB Team
Portions Copyright (c) 2017-2018, 2ndQuadrant Limited
Portions Copyright (c) 2015-2019, The OmniDB Team
Portions Copyright (c) 2017-2019, 2ndQuadrant Limited
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
4 changes: 2 additions & 2 deletions OmniDB/OmniDB_app/include/OmniDatabase/__init__.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
'''
The MIT License (MIT)
Portions Copyright (c) 2015-2018, The OmniDB Team
Portions Copyright (c) 2017-2018, 2ndQuadrant Limited
Portions Copyright (c) 2015-2019, The OmniDB Team
Portions Copyright (c) 2017-2019, 2ndQuadrant Limited
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
8 changes: 5 additions & 3 deletions OmniDB/OmniDB_app/include/Spartacus/Database.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
'''
The MIT License (MIT)
Copyright (c) 2014-2018 William Ivanski
Copyright (c) 2014-2019 William Ivanski
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down Expand Up @@ -1765,7 +1765,8 @@ def Open(self, p_autocommit=True):
db=self.v_service,
user=self.v_user,
password=self.v_password,
autocommit=p_autocommit)
autocommit=p_autocommit,
read_default_file='~/.my.cnf')
self.v_cur = self.v_con.cursor()
self.v_start = True
self.v_status = 0
Expand Down Expand Up @@ -2144,7 +2145,8 @@ def Open(self, p_autocommit=True):
db=self.v_service,
user=self.v_user,
password=self.v_password,
autocommit=p_autocommit)
autocommit=p_autocommit,
read_default_file='~/.my.cnf')
self.v_cur = self.v_con.cursor()
self.v_start = True
self.v_status = 0
Expand Down
33 changes: 24 additions & 9 deletions OmniDB/OmniDB_app/include/Spartacus/Utils.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
'''
The MIT License (MIT)
Copyright (c) 2014-2018 William Ivanski
Copyright (c) 2014-2019 William Ivanski
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand All @@ -22,7 +22,12 @@
SOFTWARE.
'''

import scrypt
try:
import scrypt
v_use_scrypt = True
except ImportError:
import pyscrypt
v_use_scrypt = False
import pyaes
import base64
import os
Expand All @@ -41,13 +46,23 @@ class Cryptor(object):
def __init__(self, p_key, p_encoding='utf-8'):
try:
self.v_encoding = p_encoding
self.v_hash = scrypt.hash(
password = p_key.encode('utf-8'),
salt = '0123456789ABCDEF'.encode('utf-8'),
N = 1024,
r = 1,
p = 1
)[:32]
if v_use_scrypt:
self.v_hash = scrypt.hash(
password = p_key.encode('utf-8'),
salt = '0123456789ABCDEF'.encode('utf-8'),
N = 1024,
r = 1,
p = 1
)[:32]
else:
self.v_hash = pyscrypt.hash(
password = p_key.encode('utf-8'),
salt = '0123456789ABCDEF'.encode('utf-8'),
N = 1024,
r = 1,
p = 1,
dkLen = 32
)
except Exception as exc:
raise Spartacus.Utils.Exception(str(exc))
def Encrypt(self, p_plaintext):
Expand Down
Loading

0 comments on commit 7a3f541

Please sign in to comment.