Skip to content
Snippets Groups Projects
Select Git revision
  • master
  • feature/startup_node_selection
  • hugo/startup_node_selection
  • develop
  • feature/encrypted_comment
  • feature/cesium_plus_pod_2
  • feature/android_api_19
  • Vivakvo/cesium-patch-8
  • gitlab_migration_1
  • dev
  • rml8
  • v1.7.0-rc1
  • v1.6.12
  • v1.6.11
  • v1.6.10
  • v1.6.9
  • v1.6.8
  • v1.6.7
  • v1.6.6
  • v1.6.5
  • v1.6.4
  • v1.6.3
  • v1.6.2
  • v1.6.2-alpha
  • v1.6.1
  • v1.6.0
  • v1.5.12
  • v1.5.11
  • v1.5.10
  • v1.5.9
  • v1.5.8
31 results

README.md

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"