Skip to content
Snippets Groups Projects
Select Git revision
  • a8180f70eb9c80a918bb254aadc993280eb19dd4
  • master default protected
  • Vivakvo/cesium-patch-8
  • issue_4
  • issue_780
  • gitlab_migration_1
  • dev
  • rml8
  • v1.4.3
  • v1.4.1
  • v1.4.0
  • v1.3.11
  • v1.3.10
  • v1.3.9
  • v1.3.8
  • v1.3.7
  • v1.3.6
  • v1.3.5
  • v1.3.4
  • v1.3.3
  • v1.3.2
  • v1.3.1
  • v1.3.0
  • v1.2.10
  • v1.2.9
  • v1.2.8
  • v1.2.7
  • v1.2.6
28 results

install.sh

Blame
  • Forked from clients / Cesium-grp / Cesium
    Source project has a limited visibility.
    auth.py 1.14 KiB
    # Copyright  2016-2025 Maël Azimi <m.a@moul.re>
    #
    # Silkaj is free software: you can redistribute it and/or modify
    # it under the terms of the GNU Affero General Public License as published by
    # the Free Software Foundation, either version 3 of the License, or
    # (at your option) any later version.
    #
    # Silkaj 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 Affero General Public License for more details.
    #
    # You should have received a copy of the GNU Affero General Public License
    # along with Silkaj. If not, see <https://www.gnu.org/licenses/>.
    
    # This file contains patches for auth functions.
    
    from duniterpy.key import SigningKey
    
    
    def patched_auth_method(uid):
        """
        insecure way to test keys
        """
        return SigningKey.from_credentials(uid, uid)
    
    
    def patched_auth_by_seed():
        return "call_auth_by_seed"
    
    
    def patched_auth_by_wif():
        return "call_auth_by_wif"
    
    
    def patched_auth_by_auth_file(authfile):
        return "call_auth_by_auth_file"
    
    
    def patched_auth_by_scrypt(nrp):
        return "call_auth_by_scrypt"