Skip to content

Commit

Permalink
lint: Set copyright in comments instead of code
Browse files Browse the repository at this point in the history
  • Loading branch information
Synss committed May 2, 2020
1 parent e91c28b commit b0f50a7
Show file tree
Hide file tree
Showing 38 changed files with 133 additions and 161 deletions.
8 changes: 4 additions & 4 deletions src/mbedtls/__init__.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
"""python-mbedtls is a this wrapper to ARM's mbed TLS library."""
# SPDX-License-Identifier: MIT
# Copyright (c) 2015, Elaborated Networkd GmbH
# Copyright (c) 2018, Mathias Laurin

__author__ = "Mathias Laurin"
__copyright__ = "Copyright 2015, Elaborated Networks GmbH"
__license__ = "MIT License"
"""python-mbedtls is a this wrapper to ARM's mbed TLS library."""


import mbedtls.cipher as cipher
Expand Down
8 changes: 4 additions & 4 deletions src/mbedtls/_md.pxd
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
"""Declarations from `mbedtls/md.h`."""
# SPDX-License-Identifier: MIT
# Copyright (c) 2015, Elaborated Networkd GmbH
# Copyright (c) 2018, Mathias Laurin

__author__ = "Mathias Laurin"
__copyright__ = "Copyright 2015, Elaborated Networks GmbH"
__license__ = "MIT License"
"""Declarations from `mbedtls/md.h`."""


cdef extern from "mbedtls/md_internal.h" nogil:
Expand Down
8 changes: 4 additions & 4 deletions src/mbedtls/_md.pyx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
"""Generic message digest wrapper (hash algorithm)."""
# SPDX-License-Identifier: MIT
# Copyright (c) 2015, Elaborated Networkd GmbH
# Copyright (c) 2018, Mathias Laurin

__author__ = "Mathias Laurin"
__copyright__ = "Copyright 2015, Elaborated Networks GmbH"
__license__ = "MIT License"
"""Generic message digest wrapper (hash algorithm)."""


cimport mbedtls._md as _md
Expand Down
7 changes: 3 additions & 4 deletions src/mbedtls/_net.pxd
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
"""Declarations from `mbedtls/net_sockets.h`."""
# SPDX-License-Identifier: MIT
# Copyright (c) 2018, Mathias Laurin

__author__ = "Mathias Laurin"
__copyright__ = "Copyright 2018, Mathias Laurin"
__license__ = "MIT License"
"""Declarations from `mbedtls/net_sockets.h`."""


cdef:
Expand Down
7 changes: 3 additions & 4 deletions src/mbedtls/_platform.pxd
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
"""Declarations from `mbedtls/platform*.h`."""
# SPDX-License-Identifier: MIT
# Copyright (c) 2019, Mathias Laurin

__author__ = "Mathias Laurin"
__copyright__ = "Copyright 2019, Mathias Laurin"
__license__ = "MIT License"
"""Declarations from `mbedtls/platform*.h`."""


cdef extern from "mbedtls/platform_util.h" nogil:
Expand Down
7 changes: 3 additions & 4 deletions src/mbedtls/_platform.pyx
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
"""Platform utils."""
# SPDX-License-Identifier: MIT
# Copyright (c) 2019, Mathias Laurin

__author__ = "Mathias Laurin"
__copyright__ = "Copyright 2019, Mathias Laurin"
__license__ = "MIT License"
"""Platform utils."""


cimport mbedtls._platform as _plt
Expand Down
8 changes: 4 additions & 4 deletions src/mbedtls/_random.pxd
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
"""Declarations for `mbedtls/ctr_drbg.h`."""
# SPDX-License-Identifier: MIT
# Copyright (c) 2016, Elaborated Networkd GmbH
# Copyright (c) 2019, Mathias Laurin

__author__ = "Mathias Laurin"
__copyright__ = "Copyright 2016, Elaborated Networks GmbH"
__license__ = "MIT License"
"""Declarations for `mbedtls/ctr_drbg.h`."""


cdef extern from "mbedtls/entropy.h" nogil:
Expand Down
8 changes: 4 additions & 4 deletions src/mbedtls/_random.pyx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
"""Random number generator (RNG) wrapper."""
# SPDX-License-Identifier: MIT
# Copyright (c) 2016, Elaborated Networkd GmbH
# Copyright (c) 2019, Mathias Laurin

__author__ = "Mathias Laurin"
__copyright__ = "Copyright 2016, Elaborated Networks GmbH"
__license__ = "MIT License"
"""Random number generator (RNG) wrapper."""


from libc.stdlib cimport malloc, free
Expand Down
7 changes: 3 additions & 4 deletions src/mbedtls/_ringbuf.pxd
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
# SPDX-License-Identifier: MIT
# Copyright (c) 2018, Mathias Laurin

"""A ring buffer.
See Also:
https://github.com/dhess/c-ringbuf/
"""

__author__ = "Mathias Laurin"
__copyright__ = "Copyright 2018, Mathias Laurin"
__license__ = "MIT License"


cdef struct ring_buffer_ctx:
unsigned char *buf
Expand Down
7 changes: 3 additions & 4 deletions src/mbedtls/_ringbuf.pyx
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# SPDX-License-Identifier: MIT
# Copyright (c) 2018, Mathias Laurin

"""A ring buffer.
See Also:
Expand All @@ -7,10 +10,6 @@ See Also:
"""

__author__ = "Mathias Laurin"
__copyright__ = "Copyright 2018, Mathias Laurin"
__license__ = "MIT License"


from libc.stdlib cimport malloc, free
from libc.string cimport memcpy
Expand Down
8 changes: 4 additions & 4 deletions src/mbedtls/cipher/AES.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# SPDX-License-Identifier: MIT
# Copyright (c) 2016, Elaborated Networkd GmbH
# Copyright (c) 2019, Mathias Laurin

"""Advanced Encryption Standard (AES) cipher established by the U.S.
NIST in 2001.
"""

__author__ = "Mathias Laurin"
__copyright__ = "Copyright 2016, Elaborated Networks GmbH"
__license__ = "MIT License"


from . import _cipher
from mbedtls.exceptions import *
Expand Down
4 changes: 4 additions & 0 deletions src/mbedtls/cipher/ARC4.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# SPDX-License-Identifier: MIT
# Copyright (c) 2016, Elaborated Networkd GmbH
# Copyright (c) 2019, Mathias Laurin

"""Alleged River Cipher 4 cipher (ARC4 or ARCFOUR) designed in 1987
at RSA Security."""

Expand Down
7 changes: 3 additions & 4 deletions src/mbedtls/cipher/ARIA.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# SPDX-License-Identifier: MIT
# Copyright (c) 2019, Mathias Laurin

"""The ARIA algorithm is a symmetric block cipher that can encrypt and
decrypt information. It is defined by the Korean Agency for Technology
and Standards (KATS) in *KS X 1213:2004* (in Korean, but see
Expand All @@ -6,10 +9,6 @@
"""

__author__ = "Mathias Laurin"
__copyright__ = "Copyright 2019, Mathias Laurin"
__license__ = "MIT License"


from . import _cipher
from mbedtls.exceptions import *
Expand Down
9 changes: 4 additions & 5 deletions src/mbedtls/cipher/Blowfish.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
"""Blowfish cipher designed by Bruce Schneier in 1993."""

# SPDX-License-Identifier: MIT
# Copyright (c) 2016, Elaborated Networkd GmbH
# Copyright (c) 2019, Mathias Laurin

__author__ = "Mathias Laurin"
__copyright__ = "Copyright 2016, Elaborated Networks GmbH"
__license__ = "MIT License"
"""Blowfish cipher designed by Bruce Schneier in 1993."""


from . import _cipher
Expand Down
7 changes: 3 additions & 4 deletions src/mbedtls/cipher/CHACHA20.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
# SPDX-License-Identifier: MIT
# Copyright (c) 2019, Stephen Y.

"""Salsa20 and the closely related ChaCha are stream ciphers developed by Daniel J. Bernstein.
"""

__author__ = "Stephen.Y"
__copyright__ = "Copyright 2019, Mathias Laurin"
__license__ = "MIT License"


from . import _cipher
from mbedtls.exceptions import *
Expand Down
8 changes: 4 additions & 4 deletions src/mbedtls/cipher/Camellia.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
"""Camellia cipher developed by Japan's Mitsubishi an NTT in 2000."""
# SPDX-License-Identifier: MIT
# Copyright (c) 2016, Elaborated Networkd GmbH
# Copyright (c) 2019, Mathias Laurin

__author__ = "Mathias Laurin"
__copyright__ = "Copyright 2016, Elaborated Networks GmbH"
__license__ = "MIT License"
"""Camellia cipher developed by Japan's Mitsubishi an NTT in 2000."""


from . import _cipher
Expand Down
9 changes: 4 additions & 5 deletions src/mbedtls/cipher/DES.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
# SPDX-License-Identifier: MIT
# Copyright (c) 2016, Elaborated Networkd GmbH
# Copyright (c) 2019, Mathias Laurin

"""Data Encryption Standard (DES) cipher developed by IBM
in the 70's."""


__author__ = "Mathias Laurin"
__copyright__ = "Copyright 2016, Elaborated Networks GmbH"
__license__ = "MIT License"


from . import _cipher
from mbedtls.exceptions import *

Expand Down
9 changes: 4 additions & 5 deletions src/mbedtls/cipher/DES3.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
# SPDX-License-Identifier: MIT
# Copyright (c) 2016, Elaborated Networkd GmbH
# Copyright (c) 2019, Mathias Laurin

"""Three-key triple DES cipher (also known as DES3, 3DES,
Triple DES, or DES-EDE3)."""


__author__ = "Mathias Laurin"
__copyright__ = "Copyright 2016, Elaborated Networks GmbH"
__license__ = "MIT License"


from . import _cipher
from mbedtls.exceptions import *

Expand Down
9 changes: 4 additions & 5 deletions src/mbedtls/cipher/DES3dbl.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
# SPDX-License-Identifier: MIT
# Copyright (c) 2016, Elaborated Networkd GmbH
# Copyright (c) 2019, Mathias Laurin

"""Two-key triple DES cipher (also known as DES3, 3DES, Triple DES,
or DES-EDE)."""


__author__ = "Mathias Laurin"
__copyright__ = "Copyright 2016, Elaborated Networks GmbH"
__license__ = "MIT License"


from . import _cipher
from mbedtls.exceptions import *

Expand Down
7 changes: 4 additions & 3 deletions src/mbedtls/cipher/__init__.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
# SPDX-License-Identifier: MIT
# Copyright (c) 2016, Elaborated Networkd GmbH
# Copyright (c) 2019, Mathias Laurin

"""The cipher package provide symmetric encryption and decryption.
The API follows the recommendations from PEP 272 "API for Block
Encryption Algorithms"
"""
__author__ = "Mathias Laurin"
__copyright__ = "Copyright 2016, Elaborated Networks GmbH"
__license__ = "MIT License"

from ._cipher import *
from . import AES
Expand Down
8 changes: 4 additions & 4 deletions src/mbedtls/cipher/_cipher.pxd
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
"""Declarations from `mbedtls/cipher.h`."""
# SPDX-License-Identifier: MIT
# Copyright (c) 2015, Elaborated Networkd GmbH
# Copyright (c) 2019, Mathias Laurin

__author__ = "Mathias Laurin"
__copyright__ = "Copyright 2015, Elaborated Networks GmbH"
__license__ = "MIT License"
"""Declarations from `mbedtls/cipher.h`."""


cdef:
Expand Down
9 changes: 4 additions & 5 deletions src/mbedtls/cipher/_cipher.pyx
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
"""Ciphers for symmetric encryption and decryption."""

# SPDX-License-Identifier: MIT
# Copyright (c) 2015, Elaborated Networkd GmbH
# Copyright (c) 2019, Mathias Laurin

__author__ = "Mathias Laurin"
__copyright__ = "Copyright 2015, Elaborated Networks GmbH"
__license__ = "MIT License"
"""Ciphers for symmetric encryption and decryption."""


cimport mbedtls.cipher._cipher as _cipher
Expand Down
7 changes: 3 additions & 4 deletions src/mbedtls/exceptions.pxd
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
"""Declarations from `mbedtls/error.h`."""
# SPDX-License-Identifier: MIT
# Copyright (c) 2018, Mathias Laurin

__author__ = "Mathias Laurin"
__copyright__ = "Copyright 2018, Mathias Laurin"
__license__ = "MIT License"
"""Declarations from `mbedtls/error.h`."""


cdef extern from "mbedtls/error.h" nogil:
Expand Down
7 changes: 3 additions & 4 deletions src/mbedtls/exceptions.pyx
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
"""This module defines exceptions and errors."""
# SPDX-License-Identifier: MIT
# Copyright (c) 2018, Mathias Laurin

"""This module defines exceptions and errors."""

__author__ = "Mathias Laurin"
__copyright__ = "Copyright 2018, Mathias Laurin"
__license__ = "MIT License"

from libc.stdlib cimport malloc, free

Expand Down
11 changes: 4 additions & 7 deletions src/mbedtls/hash.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
"""Generic message digest wrapper (hash algorithm)."""
# SPDX-License-Identifier: MIT
# Copyright (c) 2015, Elaborated Networkd GmbH
# Copyright (c) 2019, Mathias Laurin

__author__ = "Mathias Laurin"
__copyright__ = (
"Copyright 2015, Elaborated Networks GmbH, "
"Copyright 2019, Mathias Laurin"
)
__license__ = "MIT License"
"""Generic message digest wrapper (hash algorithm)."""


import mbedtls._md as _md
Expand Down
7 changes: 3 additions & 4 deletions src/mbedtls/hkdf.pxd
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
"""Declarations from `mbedtls/hkdf.h`."""
# SPDX-License-Identifier: MIT
# Copyright (c) 2019, Mathias Laurin

__author__ = "Mathias Laurin"
__copyright__ = "Copyright 2019, Mathias Laurin"
__license__ = "MIT License"
"""Declarations from `mbedtls/hkdf.h`."""


cimport mbedtls._md as _md
Expand Down
11 changes: 4 additions & 7 deletions src/mbedtls/hmac.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
"""Generic message digest wrapper (hash algorithm)."""
# SPDX-License-Identifier: MIT
# Copyright (c) 2015, Elaborated Networkd GmbH
# Copyright (c) 2019, Mathias Laurin

__author__ = "Mathias Laurin"
__copyright__ = (
"Copyright 2015, Elaborated Networks GmbH, "
"Copyright 2019, Mathias Laurin"
)
__license__ = "MIT License"
"""Generic message digest wrapper (hash algorithm)."""


import mbedtls._md as _md
Expand Down
7 changes: 3 additions & 4 deletions src/mbedtls/mpi.pxd
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
"""Declaration from `mbedtls/bignum.h`."""
# SPDX-License-Identifier: MIT
# Copyright (c) 2018, Mathias Laurin

__author__ = "Mathias Laurin"
__copyright__ = "Copyright 2018, Mathias Laurin"
__license__ = "MIT License"
"""Declaration from `mbedtls/bignum.h`."""


cdef extern from "mbedtls/bignum.h" nogil:
Expand Down

0 comments on commit b0f50a7

Please sign in to comment.