# Path: newsreap/Utils.py
# SEEK_SET = 0
# 
# Path: newsreap/Logging.py
# NEWSREAP_ENGINE = '%s.engine' % NEWSREAP_LOGGER


from cryptography.hazmat.backends import default_backend
from cryptography.hazmat.primitives.asymmetric import rsa
from cryptography.hazmat.primitives.asymmetric.rsa import RSAPrivateKey
from cryptography.hazmat.primitives.asymmetric.rsa import RSAPublicKey
from cryptography.hazmat.primitives import serialization
from cryptography.hazmat.primitives import hashes
from cryptography.hazmat.primitives.asymmetric import padding
from cryptography.exceptions import UnsupportedAlgorithm
from os.path import isfile
from base64 import b64encode
from base64 import b64decode
from StringIO import StringIO
from gzip import GzipFile
from newsreap.Utils import SEEK_SET
from newsreap.Logging import NEWSREAP_ENGINE
import logging
# 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.

# Cryptography is a fantastic up and coming replacement to OpenSSL and GnuTLS
# Reference: https://github.com/pyca/cryptography
#




# Logging
logger = logging.getLogger(NEWSREAP_ENGINE)

# OpenSSL will only write 16K at a time
SSL_WRITE_BLOCKSIZE = 16384

# The default (private) keyfile we'll create if you don't specify one.
# The default public keyfile (unless otherwise specified) is always
# the same name as the private key but with the .pub extension added to the
# end
DEFAULT_KEYFILE = "~/newsreap-rsa_id"



# Path: newsreap/Utils.py
# SEEK_SET = 0
# 
# Path: newsreap/Logging.py
# NEWSREAP_ENGINE = '%s.engine' % NEWSREAP_LOGGER


# Path: newsreap/NNTPCryptography.py
from cryptography.hazmat.backends import default_backend
from cryptography.hazmat.primitives.asymmetric import rsa
from cryptography.hazmat.primitives.asymmetric.rsa import RSAPrivateKey
from cryptography.hazmat.primitives.asymmetric.rsa import RSAPublicKey
from cryptography.hazmat.primitives import serialization
from cryptography.hazmat.primitives import hashes
from cryptography.hazmat.primitives.asymmetric import padding
from cryptography.exceptions import UnsupportedAlgorithm
from os.path import isfile
from base64 import b64encode
from base64 import b64decode
from StringIO import StringIO
from gzip import GzipFile
from newsreap.Utils import SEEK_SET
from newsreap.Logging import NEWSREAP_ENGINE
import logging

# 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.

# Cryptography is a fantastic up and coming replacement to OpenSSL and GnuTLS
# Reference: https://github.com/pyca/cryptography
#




# Logging
logger = logging.getLogger(NEWSREAP_ENGINE)

# OpenSSL will only write 16K at a time
SSL_WRITE_BLOCKSIZE = 16384

# The default (private) keyfile we'll create if you don't specify one.
# The default public keyfile (unless otherwise specified) is always
# the same name as the private key but with the .pub extension added to the
# end
DEFAULT_KEYFILE = "~/newsreap-rsa_id"



class KeySize(object):