Skip to content
Snippets Groups Projects
Select Git revision
  • a34e99e3b56a73c7f87e6dec5ab90d659b8cbe7c
  • master default
  • support_pre_UAL_arm_asm
  • skein
  • rsa-crt-hardening
  • chacha96
  • fat-library
  • versioned-symbols
  • curve25519
  • dsa-reorg
  • aead-api
  • set_key-changes
  • poly1305
  • aes-reorg
  • nettle-2.7-fixes
  • size_t-changes
  • ecc-support
  • experimental-20050201
  • lsh-1.4.2
  • nettle_3.3_release_20161001
  • nettle_3.2_release_20160128
  • nettle_3.1.1_release_20150424
  • nettle_3.1_release_20150407
  • nettle_3.1rc3
  • nettle_3.1rc2
  • nettle_3.1rc1
  • nettle_3.0_release_20140607
  • nettle_2.7.1_release_20130528
  • nettle_2.7_release_20130424
  • nettle_2.6_release_20130116
  • nettle_2.5_release_20120707
  • converted-master-branch-to-git
  • nettle_2.4_release_20110903
  • nettle_2.3_release_20110902
  • nettle_2.2_release_20110711
  • nettle_2.1_release_20100725
  • camellia_32bit_20100720
  • nettle_2.0_release_20090608
  • nettle_1.15_release_20061128
39 results

aes-set-encrypt-key.c

Blame
  • Forked from Nettle / nettle
    Source project has a limited visibility.
    Local.pmod 1.82 KiB
    #pike __REAL_VERSION__
    
    //! @[Local] gives a local module namespace used for locally
    //! installed pike modules. Modules are searched for in
    //! the directory @tt{pike_modules@} which can be located in
    //! the user's home directory or profile directory, or in any
    //! of the system directories @tt{/opt/share, /usr/local/share,
    //! /opt@} or @tt{/usr/local/@}. The user's home directory is
    //! determined by examining the environment variable HOME, and
    //! if that fails the environment variable USERPROFILE. If the 
    //! environment variable PIKE_LOCAL_PATH is set, the paths specified
    //! there will be searched first.
    //! @seealso
    //!   @[Local.add_path()], @[Local.remove_path()]
    //!
    
    inherit __joinnode;
    
    protected array(string) local_path;
    
    protected void create()
    {
      ::create(({}));
    
      // FIXME $prefix/pike_modules
      // FIXME All this should be controllable from .pikerc, when such a file is implemented...
    
      add_path("/usr/local/pike_modules");
      add_path("/opt/pike_modules");
      add_path("/opt/share/pike_modules");
      add_path("/usr/local/share/pike_modules");
    
      string tmp;
      if( (tmp=[string]getenv("HOME")) || (tmp=[string]getenv("USERPROFILE")) ) {
        tmp = (tmp[-1]=='/'?tmp:tmp+"/")+"pike_modules/";
        add_path(tmp);
      }
    
      if(tmp = [string]getenv("PIKE_LOCAL_PATH") ) {
        array to_add=reverse(tmp/":"); // preserve order
        add_path( to_add[*] ); 
      }
    }
    
    //! @decl int(0..1) add_path(string path)
    //!
    //! This function prepends @[path] to the @[Local] module
    //! searchpath.
    //!
    //! @param path
    //!   The path to the directory to be added.
    //!
    //! @returns
    //!   Returns 1 on success, otherwise 0.
    
    //! This function removes @[path] from the @[Local] module
    //! searchpath. If @[path] is not in the search path, this is
    //! a noop.
    //!
    //! @param path
    //!   The path to be removed.
    //!
    void remove_path(string path)
    {
      rem_path(path);
    }