R-Project/Package digest : Différence entre versions

De WikiOpenTruc
Aller à : navigation, rechercher
(digest)
(digest)
Ligne 3 : Ligne 3 :
  
 
==digest==
 
==digest==
 +
 +
* https://cran.r-project.org/web/packages/digest/index.html paquet a priori très basique et avec peu de fonctions. <i>Implementation of a function 'digest()' for the creation of hash digests of arbitrary R objects (using the 'md5', 'sha-1', 'sha-256', 'crc32', 'xxhash' and 'murmurhash' algorithms) permitting easy comparison of R language objects, as well as a function 'hmac()' to create hash-based message authentication code. Please note that this package is not meant to be deployed for cryptographic purposes for which more comprehensive (and widely tested) libraries such as 'OpenSSL' should be used.</i>
  
 
* installé via install.packages() (voir fullrefmanuel.pdf)
 
* installé via install.packages() (voir fullrefmanuel.pdf)

Version du 7 mai 2018 à 19:08


digest

  • https://cran.r-project.org/web/packages/digest/index.html paquet a priori très basique et avec peu de fonctions. Implementation of a function 'digest()' for the creation of hash digests of arbitrary R objects (using the 'md5', 'sha-1', 'sha-256', 'crc32', 'xxhash' and 'murmurhash' algorithms) permitting easy comparison of R language objects, as well as a function 'hmac()' to create hash-based message authentication code. Please note that this package is not meant to be deployed for cryptographic purposes for which more comprehensive (and widely tested) libraries such as 'OpenSSL' should be used.
  • installé via install.packages() (voir fullrefmanuel.pdf)
    • spécifier le paramètre lib permet d'installer le package où on veut, eg dans le répertoire principal lib = "/usr/lib/R/library". On peut ne pas le spécifier, mais alors ça va être casé dans des coins plus locaux.
    • faut aussi que les droits d'écriture soient comme il faut : chmod 777 /usr/lib/R/library , et ceci avant de lancer la session R. En effet, chmod pendant la session R ... n'est pas pris en compte.
  • lire la section du manuel R-admin.pdf
  • l'install appelle x fois gcc
> lib0 = "/usr/lib/R/library"
> install.packages("digest", lib=lib0)
--- SVP sélectionner un miroir CRAN pour cette session ---
essai de l'URL 'https://pbil.univ-lyon1.fr/CRAN/src/contrib/digest_0.6.15.tar.gz'
Content type 'application/x-gzip' length 122095 bytes (119 KB)
==================================================
downloaded 119 KB

* installing *source* package ‘digest’ ...
** package ‘digest’ correctement décompressé et sommes MD5 vérifiées
** libs
gcc -std=gnu99 -I/usr/share/R/include -DNDEBUG      -fpic  -g -O2 -fdebug-prefix-map=/build/r-base-3.3.3=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c aes.c -o aes.o
gcc -std=gnu99 -I/usr/share/R/include -DNDEBUG      -fpic  -g -O2 -fdebug-prefix-map=/build/r-base-3.3.3=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c crc32.c -o crc32.o
gcc -std=gnu99 -I/usr/share/R/include -DNDEBUG      -fpic  -g -O2 -fdebug-prefix-map=/build/r-base-3.3.3=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c digest.c -o digest.o
gcc -std=gnu99 -I/usr/share/R/include -DNDEBUG      -fpic  -g -O2 -fdebug-prefix-map=/build/r-base-3.3.3=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c init.c -o init.o
gcc -std=gnu99 -I/usr/share/R/include -DNDEBUG      -fpic  -g -O2 -fdebug-prefix-map=/build/r-base-3.3.3=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c md5.c -o md5.o
gcc -std=gnu99 -I/usr/share/R/include -DNDEBUG      -fpic  -g -O2 -fdebug-prefix-map=/build/r-base-3.3.3=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c pmurhash.c -o pmurhash.o
gcc -std=gnu99 -I/usr/share/R/include -DNDEBUG      -fpic  -g -O2 -fdebug-prefix-map=/build/r-base-3.3.3=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c raes.c -o raes.o
gcc -std=gnu99 -I/usr/share/R/include -DNDEBUG      -fpic  -g -O2 -fdebug-prefix-map=/build/r-base-3.3.3=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c sha1.c -o sha1.o
gcc -std=gnu99 -I/usr/share/R/include -DNDEBUG      -fpic  -g -O2 -fdebug-prefix-map=/build/r-base-3.3.3=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c sha2.c -o sha2.o
gcc -std=gnu99 -I/usr/share/R/include -DNDEBUG      -fpic  -g -O2 -fdebug-prefix-map=/build/r-base-3.3.3=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c sha256.c -o sha256.o
gcc -std=gnu99 -I/usr/share/R/include -DNDEBUG      -fpic  -g -O2 -fdebug-prefix-map=/build/r-base-3.3.3=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c xxhash.c -o xxhash.o
gcc -std=gnu99 -shared -L/usr/lib/R/lib -Wl,-z,relro -o digest.so aes.o crc32.o digest.o init.o md5.o pmurhash.o raes.o sha1.o sha2.o sha256.o xxhash.o -L/usr/lib/R/lib -lR
installing to /usr/lib/R/library/digest/libs
** R
** inst
** preparing package for lazy loading
** help
*** installing help indices
** building package indices
** installing vignettes
** testing if installed package can be loaded

* DONE (digest)

Les packages source téléchargés sont dans
	‘/tmp/RtmpeNTaVF/downloaded_packages’
mise à jour de la liste HTML des packages dans '.Library'
  • ne pas espérer utiliser illico les fonctions de digest ... faut encore une fois fermer et relancer R



Package openssl

C'est un package "concurrent" de digest.

  • mêmes manoeuvres qu'au-dessus
  • sous debian, au préalable, il faut avoir installé le paquet libssl-dev. Si pas fait, l'install s'interrompt en vous disant ce qui cloche et quoi faire.