Skip to content
Snippets Groups Projects
Select Git revision
  • master
  • siv-mode
  • delete-des-compat
  • delete-rsa_blind
  • aes-struct-layout
  • master-updates
  • release-3.4-fixes
  • struct-layout
  • attribute-deprecated
  • rename-data-symbols
  • x86_64-sha_ni-sha256
  • ecc-params-tweak
  • delete-old-aes
  • cmac-support
  • x86_64-sha_ni-sha1
  • gcm-ctr-opt
  • ctr-opt
  • skein
  • api-opaque-fix
  • curve448
  • nettle_3.4.1_release_20181204
  • nettle_3.4.1rc1
  • nettle_3.4_release_20171119
  • nettle_3.4rc2
  • nettle_3.4rc1
  • 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
40 results

chacha-internal.h

Blame
  • Forked from Nettle / nettle
    Source project has a limited visibility.
    • Nikos Mavrogiannopoulos's avatar
      da81c86a
      abi: explicitly export intended symbols and hide others · da81c86a
      Nikos Mavrogiannopoulos authored and Niels Möller's avatar Niels Möller committed
      This adds all exported symbols in the map files explicitly under
      the following rules:
       - Symbols mentioned in internal headers go in a section which is
         valid only for testing, and linking with these symbols will break
         in library updates.
       - Symbols mentioned in installed headers go in the exported sections
         and are considered part of the ABI.
       - All internal symbols move to internal headers.
       - The _nettle_md5_compress and _nettle_sha1_compress become exported
         without the _nettle prefix, due to existing usage.
      da81c86a
      History
      abi: explicitly export intended symbols and hide others
      Nikos Mavrogiannopoulos authored and Niels Möller's avatar Niels Möller committed
      This adds all exported symbols in the map files explicitly under
      the following rules:
       - Symbols mentioned in internal headers go in a section which is
         valid only for testing, and linking with these symbols will break
         in library updates.
       - Symbols mentioned in installed headers go in the exported sections
         and are considered part of the ABI.
       - All internal symbols move to internal headers.
       - The _nettle_md5_compress and _nettle_sha1_compress become exported
         without the _nettle prefix, due to existing usage.
    util.scm 972 B
    (define-module (util)
      :export (*unspecified* signum cross-product pi tau int)
      :replace (set!)
      :use-module (srfi srfi-1)
      )
    
    (define-public *unspecified* ((@ (guile) if) #f #f))
    
    (define-syntax set!
      (syntax-rules (=)
        ((_) *unspecified*)
    
        ((_ field = (op args ...) rest ...)
         (begin ((@ (guile) set!) field (op field args ...))
                (set! rest ...)))
    
        ((_ field proc)
         ((@ (guile) set!) field proc))
    
        ((_ field proc rest ...)
         (begin ((@ (guile) set!) field proc) (set! rest ...)))))
    
    (define (signum x)
      (cond ((zero? x) 0)
            ((positive? x) 1)
            (else -1)))
    
    (define-public sgn signum)
    
    (define (cross-product l1 l2)
      (concatenate
       (map (lambda (a)
              (map (lambda (b) (list a b))
                   l2))
            l1)))
    
    (define-public (decimals x)
      (- x (truncate x)))
    
    (define pi 3.141592653589793)
    (define tau (* 2 pi))
    
    (define int (compose inexact->exact truncate))
    
    (define-public (cot a)
      (/ (tan a)))