mirror of
https://github.com/vim/vim.git
synced 2025-07-26 11:04:33 -04:00
Added salt to blowfish encryption.
This commit is contained in:
parent
46f9d49601
commit
80794b1ce6
@ -7363,7 +7363,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
When not empty all messages are written in a file with this name.
|
||||
When the file exists messages are appended.
|
||||
Writing to the file ends when Vim exits or when 'verbosefile' is made
|
||||
empty.
|
||||
empty. Writes are buffered, thus may not show up for some time.
|
||||
Setting 'verbosefile' to a new value is like making it empty first.
|
||||
The difference with |:redir| is that verbose messages are not
|
||||
displayed when 'verbosefile' is set.
|
||||
|
@ -30,9 +30,6 @@ be worked on, but only if you sponsor Vim development. See |sponsor|.
|
||||
*known-bugs*
|
||||
-------------------- Known bugs and current work -----------------------
|
||||
|
||||
gtk_selection_clear_targets not available in GTK1 (Patrick Texier)
|
||||
Use #ifdefs to use old code for GTK1.
|
||||
|
||||
Cursor positioning wrong with 0x200e character. (John Becket, 2010 May 6)
|
||||
|
||||
E315 when trying to change a file in FileChangedRO autocommand event.
|
||||
@ -1088,7 +1085,6 @@ restored. (Luc St-Louis)
|
||||
|
||||
|
||||
Vim 7.3:
|
||||
- crash when reloading file. (Namsh, 2010 Jun 11)
|
||||
- using NSIS 2.46: install on Windows 7 works, but no "Edit with Vim" menu.
|
||||
Use register_shell_extension()? (George Reilly, 2010 May 26)
|
||||
Ron's version: http://dev.ronware.org/p/vim/finfo?name=gvim.nsi
|
||||
|
@ -1,5 +1,5 @@
|
||||
==============================================================================
|
||||
= B o n v e n o n al la I n s t r u i l o de V I M - Versio 1.7.eo.2 =
|
||||
= B o n v e n o n al la I n s t r u i l o de V I M - Versio 1.7.eo.3 =
|
||||
==============================================================================
|
||||
|
||||
Vim estas tre potenca redaktilo, kiu havas multajn komandojn, tro da ili
|
||||
@ -149,6 +149,7 @@ RIMARKO: Trairante la instruilon, ne provu memori, lernu per la uzo.
|
||||
!! RIMARKO: Antaý ol plenumi iun suban paþon ajn, legu la tutan lecionon!!
|
||||
|
||||
1. Eliru el la instruilo kiel vi faris en la leciono 1.2: :q!
|
||||
Aý, se vi havas atingon al alia terminalo, faru tion, kio sekvas tie.
|
||||
|
||||
2. Æe la þelinvito, tajpu æi tiun komandon: vim tutor <Enenklavo>
|
||||
'vim' estas la komando por lanæi la redaktilon Vim, 'tutor' estas la
|
||||
@ -159,7 +160,8 @@ RIMARKO: Trairante la instruilon, ne provu memori, lernu per la uzo.
|
||||
|
||||
4. Konservu la dosieron kun þanøoj kaj eliru el Vim per: :wq <Enenklavo>
|
||||
|
||||
5. Relanæu la instruilon vimtutor kaj moviøu suben al la sekvanta resumo.
|
||||
5. Se vi eliris la instruilon vimtutor en paþo 1, restartu la intruilon
|
||||
vimtutor kaj moviøu suben al la sekvanta resumo.
|
||||
|
||||
6. Post kiam vi legis la suprajn paþojn, kaj komprenis ilin: faru ilin.
|
||||
|
||||
@ -413,7 +415,7 @@ RIMARKO: Premo de nur la movo en Normala re
|
||||
|
||||
5. Nun moviøu al la leciono 3.3.
|
||||
|
||||
Rimarko: Memoru, ke vi devus lerni per uzo, kaj ne per memorado.
|
||||
RIMARKO: Memoru, ke vi devus lerni per uzo, kaj ne per memorado.
|
||||
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
@ -908,7 +910,7 @@ RIMARKO: Se vi deziras ignori usklecon por nur unu ser
|
||||
** Ebligu kapablojn de Vim **
|
||||
|
||||
Vim havas multe pli da kapabloj ol Vi, sed la plej multaj estas defaýlte
|
||||
malþaltitaj. Por ekuzi la kapablojn, vi devas krei dosieron "vimrc.
|
||||
malþaltitaj. Por ekuzi la kapablojn, vi devas krei dosieron "vimrc".
|
||||
|
||||
1. Ekredaktu la dosieron "vimrc". Tio dependas de via sistemo:
|
||||
:e ~/.vimrc por Unikso
|
||||
@ -969,7 +971,7 @@ RIMARKO: Kompletigo funkcias por multaj komandoj. Nur provu premi CTRL-D kaj
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Tio konkludas la instruilon de Vim. Øi celis doni mallongan superrigardon
|
||||
de la redaktilo Vim, nur tio kio sufiæas por ebligi al vi facilan uzon de
|
||||
de la redaktilo Vim, nur tion kio sufiæas por ebligi al vi facilan uzon de
|
||||
la redaktilo. Estas nepre nekompleta, æar Vim havas multajn multajn pliajn
|
||||
komandojn. Legu la manlibron: ":help user-manual".
|
||||
|
||||
@ -984,6 +986,6 @@ RIMARKO: Kompletigo funkcias por multaj komandoj. Nur provu premi CTRL-D kaj
|
||||
|
||||
Tradukita en Esperanto de Dominique Pellé, 2008-04-01
|
||||
Retpoþto: dominique.pelle@gmail.com
|
||||
Lasta þanøo: 2009-02-01
|
||||
Lasta þanøo: 2010-05-23
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
@ -1,5 +1,5 @@
|
||||
==============================================================================
|
||||
= B o n v e n o n al la I n s t r u i l o de V I M - Versio 1.7.eo.2 =
|
||||
= B o n v e n o n al la I n s t r u i l o de V I M - Versio 1.7.eo.3 =
|
||||
==============================================================================
|
||||
|
||||
Vim estas tre potenca redaktilo, kiu havas multajn komandojn, tro da ili
|
||||
@ -149,6 +149,7 @@ RIMARKO: Trairante la instruilon, ne provu memori, lernu per la uzo.
|
||||
!! RIMARKO: Antaŭ ol plenumi iun suban paŝon ajn, legu la tutan lecionon!!
|
||||
|
||||
1. Eliru el la instruilo kiel vi faris en la leciono 1.2: :q!
|
||||
Aŭ, se vi havas atingon al alia terminalo, faru tion, kio sekvas tie.
|
||||
|
||||
2. Ĉe la ŝelinvito, tajpu ĉi tiun komandon: vim tutor <Enenklavo>
|
||||
'vim' estas la komando por lanĉi la redaktilon Vim, 'tutor' estas la
|
||||
@ -159,7 +160,8 @@ RIMARKO: Trairante la instruilon, ne provu memori, lernu per la uzo.
|
||||
|
||||
4. Konservu la dosieron kun ŝanĝoj kaj eliru el Vim per: :wq <Enenklavo>
|
||||
|
||||
5. Relanĉu la instruilon vimtutor kaj moviĝu suben al la sekvanta resumo.
|
||||
5. Se vi eliris la instruilon vimtutor en paŝo 1, restartu la intruilon
|
||||
vimtutor kaj moviĝu suben al la sekvanta resumo.
|
||||
|
||||
6. Post kiam vi legis la suprajn paŝojn, kaj komprenis ilin: faru ilin.
|
||||
|
||||
@ -413,7 +415,7 @@ RIMARKO: Premo de nur la movo en Normala reĝimo sen operatoro movos
|
||||
|
||||
5. Nun moviĝu al la leciono 3.3.
|
||||
|
||||
Rimarko: Memoru, ke vi devus lerni per uzo, kaj ne per memorado.
|
||||
RIMARKO: Memoru, ke vi devus lerni per uzo, kaj ne per memorado.
|
||||
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
@ -908,7 +910,7 @@ RIMARKO: Se vi deziras ignori usklecon por nur unu serĉa komando, uzu \c
|
||||
** Ebligu kapablojn de Vim **
|
||||
|
||||
Vim havas multe pli da kapabloj ol Vi, sed la plej multaj estas defaŭlte
|
||||
malŝaltitaj. Por ekuzi la kapablojn, vi devas krei dosieron "vimrc.
|
||||
malŝaltitaj. Por ekuzi la kapablojn, vi devas krei dosieron "vimrc".
|
||||
|
||||
1. Ekredaktu la dosieron "vimrc". Tio dependas de via sistemo:
|
||||
:e ~/.vimrc por Unikso
|
||||
@ -969,7 +971,7 @@ RIMARKO: Kompletigo funkcias por multaj komandoj. Nur provu premi CTRL-D kaj
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Tio konkludas la instruilon de Vim. Ĝi celis doni mallongan superrigardon
|
||||
de la redaktilo Vim, nur tio kio sufiĉas por ebligi al vi facilan uzon de
|
||||
de la redaktilo Vim, nur tion kio sufiĉas por ebligi al vi facilan uzon de
|
||||
la redaktilo. Estas nepre nekompleta, ĉar Vim havas multajn multajn pliajn
|
||||
komandojn. Legu la manlibron: ":help user-manual".
|
||||
|
||||
@ -984,6 +986,6 @@ RIMARKO: Kompletigo funkcias por multaj komandoj. Nur provu premi CTRL-D kaj
|
||||
|
||||
Tradukita en Esperanto de Dominique Pellé, 2008-04-01
|
||||
Retpoŝto: dominique.pelle@gmail.com
|
||||
Lasta ŝanĝo: 2009-02-01
|
||||
Lasta ŝanĝo: 2010-05-23
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
@ -1,5 +1,5 @@
|
||||
===============================================================================
|
||||
= B i e n v e n u e dans le T u t o r i e l de V I M - Version 1.7.fr.1 =
|
||||
= B i e n v e n u e dans le T u t o r i e l de V I M - Version 1.7.fr.2 =
|
||||
===============================================================================
|
||||
|
||||
Vim est un éditeur très puissant qui a trop de commandes pour pouvoir
|
||||
@ -67,7 +67,7 @@ NOTE : Les touches fl
|
||||
4. Si vous avez mémorisé ces étapes et êtes confiant, effectuez les étapes
|
||||
1 à 3 pour sortir puis rentrer dans l'éditeur.
|
||||
|
||||
NOTE : :q! <Entrée> annule tous le changements que vous avez fait. Dans
|
||||
NOTE : :q! <Entrée> annule tous les changements que vous avez fait. Dans
|
||||
quelques leçons, vous apprendrez à enregistrer les changements.
|
||||
|
||||
5. Déplacez le curseur à la Leçon 1.3.
|
||||
@ -401,7 +401,7 @@ NOTE : Le seul appui d'un mouvement en mode Normal, sans commande, d
|
||||
|
||||
2. Tapez dd pour effacer la ligne et la placer dans un registre de Vim.
|
||||
|
||||
3. Déplacez le curseur sur la ligne c) au dessus où vous voulez remettre la
|
||||
3. Déplacez le curseur sur la ligne c) au-dessus où vous voulez remettre la
|
||||
ligne effacée.
|
||||
|
||||
4. En mode Normal, tapez p pour remettre la ligne en dessous du curseur.
|
||||
@ -486,7 +486,7 @@ Notez que ce efface le mot et vous place ensuite en mode Insertion.
|
||||
---> La fin de cette ligne doit être rendue identique à la seconde.
|
||||
---> La fin de cette ligne doit être corrigée avec la commande c$ .
|
||||
|
||||
NOTE : Vous pouvez utilisez la touche Retour Arrière pour corriger les
|
||||
NOTE : Vous pouvez utiliser la touche Retour Arrière pour corriger les
|
||||
erreurs lorsque vous tapez.
|
||||
|
||||
|
||||
@ -722,14 +722,14 @@ NOTE : L'appui de v d
|
||||
|
||||
** Pour insérer le contenu d'un fichier, tapez :r FICHIER **
|
||||
|
||||
1. Placez le curseur juste au dessus de cette ligne.
|
||||
1. Placez le curseur juste au-dessus de cette ligne.
|
||||
|
||||
NOTE : Après avoir exécuté l'étape 2 vous verrez du texte de la Leçon 5.3.
|
||||
Puis déplacez vous vers le bas pour voir cette leçon à nouveau.
|
||||
|
||||
2. Maintenant récupérez votre fichier TEST en utilisant la commande :r TEST
|
||||
où TEST est le nom de votre fichier.
|
||||
Le fichier que vous récupérez est placé au dessous de la ligne du curseur.
|
||||
Le fichier que vous récupérez est placé au-dessous de la ligne du curseur.
|
||||
|
||||
4. Pour vérifier que le fichier a bien été inséré, remontez et vérifiez
|
||||
qu'il y a maintenant deux copies de la Leçon 5.3, l'originale et celle
|
||||
@ -779,7 +779,7 @@ NOTE : Vous pouvez aussi lire la sortie d'une commande externe. Par exemple,
|
||||
|
||||
---> En tapant o le curseur se met sur la ligne ouverte, en mode Insertion.
|
||||
|
||||
4. Pour ouvrir une ligne au DESSUS du curseur, tapez simplement un O
|
||||
4. Pour ouvrir une ligne au-DESSUS du curseur, tapez simplement un O
|
||||
majuscule, plutôt qu'un o minuscule. Faites un essai sur la ligne
|
||||
ci-dessous.
|
||||
|
||||
@ -849,7 +849,7 @@ NOTE : Le mode Remplacement est comme le mode Insertion, mais tous les
|
||||
|
||||
3. Tapez y pour copier le texte en surbrillance.
|
||||
|
||||
4. Déplacez la curseur à la fin de la ligne suivante : j$
|
||||
4. Déplacez le curseur à la fin de la ligne suivante : j$
|
||||
|
||||
5. Tapez p pour coller le texte. Puis tapez : un second <Échap> .
|
||||
|
||||
@ -893,7 +893,7 @@ NOTE : Si vous voulez ignorer la casse uniquement pour une recherche, utilisez
|
||||
|
||||
|
||||
1. Taper o ouvre une ligne SOUS le curseur et démarre le mode Insertion.
|
||||
Taper O ouvre une ligne au DESSUS du curseur.
|
||||
Taper O ouvre une ligne au-DESSUS du curseur.
|
||||
|
||||
2. Taper a pour insérer du texte APRÈS le curseur.
|
||||
Taper A pour insérer du texte après la fin de ligne.
|
||||
@ -985,7 +985,7 @@ NOTE : Si vous voulez ignorer la casse uniquement pour une recherche, utilisez
|
||||
|
||||
7 Appuyez <TAB>. Vim va compléter le nom (s'il est unique).
|
||||
|
||||
NOTE : Le complètement fonctionne pour de nombreuse commandes. Essayez
|
||||
NOTE : Le complètement fonctionne pour de nombreuses commandes. Essayez
|
||||
d'appuyer CTRL-D et <TAB>. C'est utile en particulier pour :help .
|
||||
|
||||
|
||||
@ -1034,5 +1034,5 @@ NOTE : Le compl
|
||||
Dernières mises à jour par Dominique Pellé.
|
||||
|
||||
E-mail : dominique.pelle@gmail.com
|
||||
Last Change : 2008 Nov 23
|
||||
Last Change : 2010 May 23
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
@ -1,5 +1,5 @@
|
||||
===============================================================================
|
||||
= B i e n v e n u e dans le T u t o r i e l de V I M - Version 1.7.fr.1 =
|
||||
= B i e n v e n u e dans le T u t o r i e l de V I M - Version 1.7.fr.2 =
|
||||
===============================================================================
|
||||
|
||||
Vim est un éditeur très puissant qui a trop de commandes pour pouvoir
|
||||
@ -67,7 +67,7 @@ NOTE : Les touches fléchées devraient également fonctionner. Mais en utilisan
|
||||
4. Si vous avez mémorisé ces étapes et êtes confiant, effectuez les étapes
|
||||
1 à 3 pour sortir puis rentrer dans l'éditeur.
|
||||
|
||||
NOTE : :q! <Entrée> annule tous le changements que vous avez fait. Dans
|
||||
NOTE : :q! <Entrée> annule tous les changements que vous avez fait. Dans
|
||||
quelques leçons, vous apprendrez à enregistrer les changements.
|
||||
|
||||
5. Déplacez le curseur à la Leçon 1.3.
|
||||
@ -401,7 +401,7 @@ NOTE : Le seul appui d'un mouvement en mode Normal, sans commande, déplace le
|
||||
|
||||
2. Tapez dd pour effacer la ligne et la placer dans un registre de Vim.
|
||||
|
||||
3. Déplacez le curseur sur la ligne c) au dessus où vous voulez remettre la
|
||||
3. Déplacez le curseur sur la ligne c) au-dessus où vous voulez remettre la
|
||||
ligne effacée.
|
||||
|
||||
4. En mode Normal, tapez p pour remettre la ligne en dessous du curseur.
|
||||
@ -486,7 +486,7 @@ Notez que ce efface le mot et vous place ensuite en mode Insertion.
|
||||
---> La fin de cette ligne doit être rendue identique à la seconde.
|
||||
---> La fin de cette ligne doit être corrigée avec la commande c$ .
|
||||
|
||||
NOTE : Vous pouvez utilisez la touche Retour Arrière pour corriger les
|
||||
NOTE : Vous pouvez utiliser la touche Retour Arrière pour corriger les
|
||||
erreurs lorsque vous tapez.
|
||||
|
||||
|
||||
@ -722,14 +722,14 @@ NOTE : L'appui de v démarre la sélection Visuelle. Vous pouvez déplacer le
|
||||
|
||||
** Pour insérer le contenu d'un fichier, tapez :r FICHIER **
|
||||
|
||||
1. Placez le curseur juste au dessus de cette ligne.
|
||||
1. Placez le curseur juste au-dessus de cette ligne.
|
||||
|
||||
NOTE : Après avoir exécuté l'étape 2 vous verrez du texte de la Leçon 5.3.
|
||||
Puis déplacez vous vers le bas pour voir cette leçon à nouveau.
|
||||
|
||||
2. Maintenant récupérez votre fichier TEST en utilisant la commande :r TEST
|
||||
où TEST est le nom de votre fichier.
|
||||
Le fichier que vous récupérez est placé au dessous de la ligne du curseur.
|
||||
Le fichier que vous récupérez est placé au-dessous de la ligne du curseur.
|
||||
|
||||
4. Pour vérifier que le fichier a bien été inséré, remontez et vérifiez
|
||||
qu'il y a maintenant deux copies de la Leçon 5.3, l'originale et celle
|
||||
@ -779,7 +779,7 @@ NOTE : Vous pouvez aussi lire la sortie d'une commande externe. Par exemple,
|
||||
|
||||
---> En tapant o le curseur se met sur la ligne ouverte, en mode Insertion.
|
||||
|
||||
4. Pour ouvrir une ligne au DESSUS du curseur, tapez simplement un O
|
||||
4. Pour ouvrir une ligne au-DESSUS du curseur, tapez simplement un O
|
||||
majuscule, plutôt qu'un o minuscule. Faites un essai sur la ligne
|
||||
ci-dessous.
|
||||
|
||||
@ -849,7 +849,7 @@ NOTE : Le mode Remplacement est comme le mode Insertion, mais tous les
|
||||
|
||||
3. Tapez y pour copier le texte en surbrillance.
|
||||
|
||||
4. Déplacez la curseur à la fin de la ligne suivante : j$
|
||||
4. Déplacez le curseur à la fin de la ligne suivante : j$
|
||||
|
||||
5. Tapez p pour coller le texte. Puis tapez : un second <Échap> .
|
||||
|
||||
@ -893,7 +893,7 @@ NOTE : Si vous voulez ignorer la casse uniquement pour une recherche, utilisez
|
||||
|
||||
|
||||
1. Taper o ouvre une ligne SOUS le curseur et démarre le mode Insertion.
|
||||
Taper O ouvre une ligne au DESSUS du curseur.
|
||||
Taper O ouvre une ligne au-DESSUS du curseur.
|
||||
|
||||
2. Taper a pour insérer du texte APRÈS le curseur.
|
||||
Taper A pour insérer du texte après la fin de ligne.
|
||||
@ -985,7 +985,7 @@ NOTE : Si vous voulez ignorer la casse uniquement pour une recherche, utilisez
|
||||
|
||||
7 Appuyez <TAB>. Vim va compléter le nom (s'il est unique).
|
||||
|
||||
NOTE : Le complètement fonctionne pour de nombreuse commandes. Essayez
|
||||
NOTE : Le complètement fonctionne pour de nombreuses commandes. Essayez
|
||||
d'appuyer CTRL-D et <TAB>. C'est utile en particulier pour :help .
|
||||
|
||||
|
||||
@ -1034,5 +1034,5 @@ NOTE : Le complètement fonctionne pour de nombreuse commandes. Essayez
|
||||
Dernières mises à jour par Dominique Pellé.
|
||||
|
||||
E-mail : dominique.pelle@gmail.com
|
||||
Last Change : 2008 Nov 23
|
||||
Last Change : 2010 May 23
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
@ -402,22 +402,40 @@ bf_d_cblock(block)
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Initialize the crypt method using "password" as the encryption key and
|
||||
* "salt[salt_len]" as the salt.
|
||||
*/
|
||||
void
|
||||
bf_key_init(password)
|
||||
bf_key_init(password, salt, salt_len)
|
||||
char_u *password;
|
||||
char_u *salt;
|
||||
int salt_len;
|
||||
{
|
||||
int i, j, keypos = 0;
|
||||
UINT32_T val, data_l, data_r;
|
||||
char_u *key;
|
||||
int keylen;
|
||||
|
||||
key = sha256_key(password);
|
||||
keylen = (int)STRLEN(key);
|
||||
/* Process the key 1000 times.
|
||||
* See http://en.wikipedia.org/wiki/Key_strengthening. */
|
||||
key = sha256_key(password, salt, salt_len);
|
||||
for (i = 0; i < 1000; i++)
|
||||
key = sha256_key(key, salt, salt_len);
|
||||
|
||||
/* Convert the key from 64 hex chars to 32 binary chars. */
|
||||
keylen = (int)STRLEN(key) / 2;
|
||||
if (keylen == 0)
|
||||
{
|
||||
EMSG(_("E831: bf_key_init() called with empty password"));
|
||||
return;
|
||||
}
|
||||
for (i = 0; i < keylen; i++)
|
||||
{
|
||||
sscanf((char *)&key[i * 2], "%2x", &j);
|
||||
key[i] = j;
|
||||
}
|
||||
|
||||
for (i = 0; i < 256; ++i)
|
||||
{
|
||||
sbx[0][i] = sbi[0][i];
|
||||
@ -475,9 +493,10 @@ bf_check_tables(ipa, sbi, val)
|
||||
|
||||
typedef struct {
|
||||
char_u password[64];
|
||||
char_u plaintxt[8];
|
||||
char_u cryptxt[8];
|
||||
char_u badcryptxt[8]; /* cryptxt when big/little endian is wrong */
|
||||
char_u salt[9];
|
||||
char_u plaintxt[9];
|
||||
char_u cryptxt[9];
|
||||
char_u badcryptxt[9]; /* cryptxt when big/little endian is wrong */
|
||||
UINT32_T keysum;
|
||||
} struct_bf_test_data;
|
||||
|
||||
@ -488,10 +507,11 @@ typedef struct {
|
||||
static struct_bf_test_data bf_test_data[] = {
|
||||
{
|
||||
"password",
|
||||
"salt",
|
||||
"plaintxt",
|
||||
"\x55\xca\x56\x3a\xef\xe1\x9c\x73", /* cryptxt */
|
||||
"\x47\xd9\x67\x49\x91\xc5\x9a\x95", /* badcryptxt */
|
||||
0x5de01bdbu, /* keysum */
|
||||
"\xad\x3d\xfa\x7f\xe8\xea\x40\xf6", /* cryptxt */
|
||||
"\x72\x50\x3b\x38\x10\x60\x22\xa7", /* badcryptxt */
|
||||
0x56701b5du /* keysum */
|
||||
},
|
||||
};
|
||||
|
||||
@ -519,7 +539,9 @@ bf_self_test()
|
||||
bn = ARRAY_LENGTH(bf_test_data);
|
||||
for (i = 0; i < bn; i++)
|
||||
{
|
||||
bf_key_init((char_u *)(bf_test_data[i].password));
|
||||
bf_key_init((char_u *)(bf_test_data[i].password),
|
||||
bf_test_data[i].salt,
|
||||
(int)STRLEN(bf_test_data[i].salt));
|
||||
if (!bf_check_tables(pax, sbx, bf_test_data[i].keysum))
|
||||
err++;
|
||||
|
||||
|
68
src/fileio.c
68
src/fileio.c
@ -37,7 +37,12 @@
|
||||
static char *crypt_magic[] = {"VimCrypt~01!", "VimCrypt~02!"};
|
||||
static char crypt_magic_head[] = "VimCrypt~";
|
||||
# define CRYPT_MAGIC_LEN 12 /* must be multiple of 4! */
|
||||
|
||||
/* For blowfish, after the magic header, we store 8 bytes of salt and then 8
|
||||
* bytes of seed (initialisation vector). */
|
||||
static int crypt_salt_len[] = {0, 8};
|
||||
static int crypt_seed_len[] = {0, 8};
|
||||
#define CRYPT_SALT_LEN_MAX 8
|
||||
#define CRYPT_SEED_LEN_MAX 8
|
||||
#endif
|
||||
|
||||
@ -1441,6 +1446,7 @@ retry:
|
||||
if ((filesize == 0
|
||||
# ifdef FEAT_CRYPT
|
||||
|| (filesize == (CRYPT_MAGIC_LEN
|
||||
+ crypt_salt_len[use_crypt_method]
|
||||
+ crypt_seed_len[use_crypt_method])
|
||||
&& cryptkey != NULL)
|
||||
# endif
|
||||
@ -2488,7 +2494,9 @@ failed:
|
||||
#ifdef FEAT_CRYPT
|
||||
if (cryptkey != NULL)
|
||||
msg_add_lines(c, (long)linecnt, filesize
|
||||
- CRYPT_MAGIC_LEN - crypt_seed_len[use_crypt_method]);
|
||||
- CRYPT_MAGIC_LEN
|
||||
- crypt_salt_len[use_crypt_method]
|
||||
- crypt_seed_len[use_crypt_method]);
|
||||
else
|
||||
#endif
|
||||
msg_add_lines(c, (long)linecnt, filesize);
|
||||
@ -2841,7 +2849,7 @@ get_crypt_method(ptr, len)
|
||||
|
||||
for (i = 0; i < (int)(sizeof(crypt_magic) / sizeof(crypt_magic[0])); i++)
|
||||
{
|
||||
if (len < (CRYPT_MAGIC_LEN + crypt_seed_len[i]))
|
||||
if (len < (CRYPT_MAGIC_LEN + crypt_salt_len[i] + crypt_seed_len[i]))
|
||||
continue;
|
||||
if (memcmp(ptr, crypt_magic[i], CRYPT_MAGIC_LEN) == 0)
|
||||
return i;
|
||||
@ -2903,19 +2911,20 @@ check_for_cryptkey(cryptkey, ptr, sizep, filesizep, newfile, did_ask)
|
||||
if (cryptkey != NULL)
|
||||
{
|
||||
int seed_len = crypt_seed_len[method];
|
||||
int salt_len = crypt_salt_len[method];
|
||||
|
||||
if (method == 0)
|
||||
crypt_init_keys(cryptkey);
|
||||
else
|
||||
{
|
||||
bf_key_init(cryptkey);
|
||||
bf_ofb_init(ptr + CRYPT_MAGIC_LEN, seed_len);
|
||||
bf_key_init(cryptkey, ptr + CRYPT_MAGIC_LEN, salt_len);
|
||||
bf_ofb_init(ptr + CRYPT_MAGIC_LEN + salt_len, seed_len);
|
||||
}
|
||||
|
||||
/* Remove magic number from the text */
|
||||
*filesizep += CRYPT_MAGIC_LEN + seed_len;
|
||||
*sizep -= CRYPT_MAGIC_LEN + seed_len;
|
||||
mch_memmove(ptr, ptr + CRYPT_MAGIC_LEN + seed_len, (size_t)*sizep);
|
||||
*filesizep += CRYPT_MAGIC_LEN + salt_len + seed_len;
|
||||
*sizep -= CRYPT_MAGIC_LEN + salt_len + seed_len;
|
||||
mch_memmove(ptr, ptr + CRYPT_MAGIC_LEN + salt_len + seed_len, (size_t)*sizep);
|
||||
}
|
||||
}
|
||||
/* When starting to edit a new file which does not have encryption, clear
|
||||
@ -2935,12 +2944,15 @@ prepare_crypt_read(fp)
|
||||
FILE *fp;
|
||||
{
|
||||
int method;
|
||||
char_u buffer[CRYPT_MAGIC_LEN + CRYPT_SEED_LEN_MAX + 2];
|
||||
char_u buffer[CRYPT_MAGIC_LEN + CRYPT_SALT_LEN_MAX
|
||||
+ CRYPT_SEED_LEN_MAX + 2];
|
||||
|
||||
if (fread(buffer, CRYPT_MAGIC_LEN, 1, fp) != 1)
|
||||
return FAIL;
|
||||
method = get_crypt_method((char *)buffer,
|
||||
CRYPT_MAGIC_LEN + CRYPT_SEED_LEN_MAX);
|
||||
CRYPT_MAGIC_LEN +
|
||||
CRYPT_SEED_LEN_MAX +
|
||||
CRYPT_SALT_LEN_MAX);
|
||||
if (method < 0 || method != curbuf->b_p_cm)
|
||||
return FAIL;
|
||||
|
||||
@ -2948,12 +2960,13 @@ prepare_crypt_read(fp)
|
||||
crypt_init_keys(curbuf->b_p_key);
|
||||
else
|
||||
{
|
||||
int salt_len = crypt_salt_len[method];
|
||||
int seed_len = crypt_seed_len[method];
|
||||
|
||||
if (fread(buffer, seed_len, 1, fp) != 1)
|
||||
if (fread(buffer, salt_len + seed_len, 1, fp) != 1)
|
||||
return FAIL;
|
||||
bf_key_init(curbuf->b_p_key);
|
||||
bf_ofb_init(buffer, seed_len);
|
||||
bf_key_init(curbuf->b_p_key, buffer, salt_len);
|
||||
bf_ofb_init(buffer + salt_len, seed_len);
|
||||
}
|
||||
return OK;
|
||||
}
|
||||
@ -2969,8 +2982,12 @@ prepare_crypt_write(buf, lenp)
|
||||
{
|
||||
char_u *header;
|
||||
int seed_len = crypt_seed_len[buf->b_p_cm];
|
||||
int salt_len = crypt_salt_len[buf->b_p_cm];
|
||||
char_u *salt;
|
||||
char_u *seed;
|
||||
|
||||
header = alloc_clear(CRYPT_MAGIC_LEN + CRYPT_SEED_LEN_MAX + 2);
|
||||
header = alloc_clear(CRYPT_MAGIC_LEN + CRYPT_SALT_LEN_MAX
|
||||
+ CRYPT_SEED_LEN_MAX + 2);
|
||||
if (header != NULL)
|
||||
{
|
||||
use_crypt_method = buf->b_p_cm; /* select pkzip or blowfish */
|
||||
@ -2980,27 +2997,32 @@ prepare_crypt_write(buf, lenp)
|
||||
crypt_init_keys(buf->b_p_key);
|
||||
else
|
||||
{
|
||||
/* Using blowfish, add seed. */
|
||||
sha2_seed(header + CRYPT_MAGIC_LEN, seed_len); /* create iv */
|
||||
bf_ofb_init(header + CRYPT_MAGIC_LEN, seed_len);
|
||||
bf_key_init(buf->b_p_key);
|
||||
/* Using blowfish, add salt and seed. */
|
||||
salt = header + CRYPT_MAGIC_LEN;
|
||||
seed = salt + salt_len;
|
||||
sha2_seed(salt, salt_len, seed, seed_len);
|
||||
bf_key_init(buf->b_p_key, salt, salt_len);
|
||||
bf_ofb_init(seed, seed_len);
|
||||
}
|
||||
}
|
||||
*lenp = CRYPT_MAGIC_LEN + seed_len;
|
||||
*lenp = CRYPT_MAGIC_LEN + salt_len + seed_len;
|
||||
return header;
|
||||
}
|
||||
|
||||
#endif /* FEAT_CRYPT */
|
||||
|
||||
/*
|
||||
* Like fwrite() but crypt the bytes when 'key' is set.
|
||||
* Returns 1 if successful.
|
||||
*/
|
||||
size_t
|
||||
fwrite_crypt(buf, ptr, len, fp)
|
||||
buf_T *buf;
|
||||
buf_T *buf UNUSED;
|
||||
char_u *ptr;
|
||||
size_t len;
|
||||
FILE *fp;
|
||||
{
|
||||
#ifdef FEAT_CRYPT
|
||||
char_u *copy;
|
||||
char_u small_buf[100];
|
||||
size_t i;
|
||||
@ -3020,6 +3042,9 @@ fwrite_crypt(buf, ptr, len, fp)
|
||||
if (copy != small_buf)
|
||||
vim_free(copy);
|
||||
return i;
|
||||
#else
|
||||
return fwrite(ptr, len, (size_t)1, fp);
|
||||
#endif
|
||||
}
|
||||
|
||||
/*
|
||||
@ -3028,19 +3053,20 @@ fwrite_crypt(buf, ptr, len, fp)
|
||||
*/
|
||||
char_u *
|
||||
read_string_decrypt(buf, fd, len)
|
||||
buf_T *buf;
|
||||
buf_T *buf UNUSED;
|
||||
FILE *fd;
|
||||
int len;
|
||||
{
|
||||
char_u *ptr;
|
||||
|
||||
ptr = read_string(fd, len);
|
||||
#ifdef FEAT_CRYPT
|
||||
if (ptr != NULL || *buf->b_p_key != NUL)
|
||||
crypt_decode(ptr, len);
|
||||
#endif
|
||||
return ptr;
|
||||
}
|
||||
|
||||
#endif /* FEAT_CRYPT */
|
||||
|
||||
#ifdef UNIX
|
||||
static void
|
||||
|
169
src/po/eo.po
169
src/po/eo.po
@ -23,14 +23,29 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Vim(Esperanto)\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2010-02-16 21:54+0100\n"
|
||||
"PO-Revision-Date: 2010-02-16 21:56+0100\n"
|
||||
"POT-Creation-Date: 2010-06-12 07:15+0200\n"
|
||||
"PO-Revision-Date: 2010-06-12 08:24+0200\n"
|
||||
"Last-Translator: Dominique PELLÉ <dominique.pelle@gmail.com>\n"
|
||||
"Language-Team: \n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=utf-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
|
||||
msgid "E831: bf_key_init() called with empty password"
|
||||
msgstr "E831: bf_key_init() alvokita kun malplena pasvorto"
|
||||
|
||||
msgid "E820: sizeof(uint32_t) != 4"
|
||||
msgstr "E820: sizeof(uint32_t) != 4"
|
||||
|
||||
msgid "E817: Blowfish big/little endian use wrong"
|
||||
msgstr "E817: Misuzo de pezkomenca/pezfina en blowfish"
|
||||
|
||||
msgid "E818: sha256 test failed"
|
||||
msgstr "E818: Testo de sha256 fiaskis"
|
||||
|
||||
msgid "E819: Blowfish test failed"
|
||||
msgstr "E819: Testo de blowfish fiaskis"
|
||||
|
||||
msgid "E82: Cannot allocate any buffer, exiting..."
|
||||
msgstr "E82: Ne eblas disponigi iun ajn bufron, nun eliras..."
|
||||
|
||||
@ -749,7 +764,6 @@ msgstr "daŭrigas en %s"
|
||||
msgid "E133: :return not inside a function"
|
||||
msgstr "E133: \":return\" ekster funkcio"
|
||||
|
||||
#, c-format
|
||||
msgid ""
|
||||
"\n"
|
||||
"# global variables:\n"
|
||||
@ -1039,7 +1053,7 @@ msgid " (NOT FOUND)"
|
||||
msgstr " (NETROVITA)"
|
||||
|
||||
msgid " (not supported)"
|
||||
msgstr " (nesubtenita)"
|
||||
msgstr " (nesubtenata)"
|
||||
|
||||
msgid "[Deleted]"
|
||||
msgstr "[Forviŝita]"
|
||||
@ -1070,8 +1084,8 @@ msgstr "Neniu kontrolpunkto estas difinita"
|
||||
msgid "%3d %s %s line %ld"
|
||||
msgstr "%3d %s %s linio %ld"
|
||||
|
||||
msgid "E750: First use :profile start <fname>"
|
||||
msgstr "E750: Uzu unue \":profile start <dosiernomo>\""
|
||||
msgid "E750: First use \":profile start {fname}\""
|
||||
msgstr "E750: Uzu unue \":profile start {dosiernomo}\""
|
||||
|
||||
#, c-format
|
||||
msgid "Save changes to \"%s\"?"
|
||||
@ -1096,10 +1110,6 @@ msgstr "E164: Ne eblas iri antaŭ ol la unuan dosieron"
|
||||
msgid "E165: Cannot go beyond last file"
|
||||
msgstr "E165: Ne eblas iri preter la lastan dosieron"
|
||||
|
||||
#, c-format
|
||||
msgid "E666: compiler not supported: %s"
|
||||
msgstr "E666: kompililo nesubtenita: %s"
|
||||
|
||||
#, c-format
|
||||
msgid "Searching for \"%s\" in \"%s\""
|
||||
msgstr "Serĉado de \"%s\" en \"%s\""
|
||||
@ -1279,6 +1289,9 @@ msgstr ""
|
||||
msgid "E467: Custom completion requires a function argument"
|
||||
msgstr "E467: Uzula kompletigo bezonas funkcian argumenton"
|
||||
|
||||
msgid "unknown"
|
||||
msgstr "nekonata"
|
||||
|
||||
#, c-format
|
||||
msgid "E185: Cannot find color scheme %s"
|
||||
msgstr "E185: Ne eblas trovi agordaron de koloroj %s"
|
||||
@ -1645,6 +1658,9 @@ msgstr "Konverto kun 'charconvert' fiaskis"
|
||||
msgid "can't read output of 'charconvert'"
|
||||
msgstr "ne eblas legi la eligon de 'charconvert'"
|
||||
|
||||
msgid "E821: File is encrypted with unknown method"
|
||||
msgstr "E821: Dosiero estas ĉifrata per nekonata metodo"
|
||||
|
||||
msgid "E676: No matching autocommands for acwrite buffer"
|
||||
msgstr "E676: Neniu kongrua aŭtokomando por la bufro acwrite"
|
||||
|
||||
@ -1792,6 +1808,10 @@ msgstr "%ld linioj, "
|
||||
msgid "1 character"
|
||||
msgstr "1 signo"
|
||||
|
||||
#, c-format
|
||||
msgid "%lld characters"
|
||||
msgstr "%lld signoj"
|
||||
|
||||
#, c-format
|
||||
msgid "%ld characters"
|
||||
msgstr "%ld signoj"
|
||||
@ -2169,7 +2189,7 @@ msgstr "E671: Ne eblas trovi titolon de fenestro \"%s\""
|
||||
|
||||
#, c-format
|
||||
msgid "E243: Argument not supported: \"-%s\"; Use the OLE version."
|
||||
msgstr "E243: Ne subtenita argumento: \"-%s\"; Uzu la version OLE."
|
||||
msgstr "E243: Ne subtenata argumento: \"-%s\"; Uzu la version OLE."
|
||||
|
||||
msgid "E672: Unable to open window inside MDI application"
|
||||
msgstr "E672: Ne eblas malfermi fenestron interne de aplikaĵo MDI"
|
||||
@ -2321,7 +2341,7 @@ msgstr "E618: \"%s\" ne estas dosiero de PostSkripta rimedo"
|
||||
|
||||
#, c-format
|
||||
msgid "E619: file \"%s\" is not a supported PostScript resource file"
|
||||
msgstr "E619: \"%s\" ne estas subtenita dosiero de PostSkripta rimedo"
|
||||
msgstr "E619: \"%s\" ne estas subtenata dosiero de PostSkripta rimedo"
|
||||
|
||||
#, c-format
|
||||
msgid "E621: \"%s\" resource file has wrong version"
|
||||
@ -2441,14 +2461,14 @@ msgstr "E623: Ne eblis naskigi procezon cscope"
|
||||
msgid "E567: no cscope connections"
|
||||
msgstr "E567: neniu konekto al cscope"
|
||||
|
||||
#, c-format
|
||||
msgid "E259: no matches found for cscope query %s of %s"
|
||||
msgstr "E259: neniu kongruo trovita por serĉo per cscope %s de %s"
|
||||
|
||||
#, c-format
|
||||
msgid "E469: invalid cscopequickfix flag %c for %c"
|
||||
msgstr "E469: nevalida flago cscopequickfix %c de %c"
|
||||
|
||||
#, c-format
|
||||
msgid "E259: no matches found for cscope query %s of %s"
|
||||
msgstr "E259: neniu kongruo trovita por serĉo per cscope %s de %s"
|
||||
|
||||
msgid "cscope commands:\n"
|
||||
msgstr "komandoj de cscope:\n"
|
||||
|
||||
@ -2880,6 +2900,9 @@ msgstr "Nevalida argumento por"
|
||||
msgid "%d files to edit\n"
|
||||
msgstr "%d redaktendaj dosieroj\n"
|
||||
|
||||
msgid "netbeans is not supported with this GUI\n"
|
||||
msgstr "netbeans ne estas subtenata kun tiu grafika interfaco\n"
|
||||
|
||||
msgid "This Vim was not compiled with the diff feature."
|
||||
msgstr "Tiu Vim ne estis kompilita kun la kompara eblo."
|
||||
|
||||
@ -2971,7 +2994,7 @@ msgid "--\t\t\tOnly file names after this"
|
||||
msgstr "--\t\t\tNur dosiernomoj malantaŭ tio"
|
||||
|
||||
msgid "--literal\t\tDon't expand wildcards"
|
||||
msgstr "--literal\t\tNe ekspansii ĵokerojn"
|
||||
msgstr "--literal\t\tNe malvolvi ĵokerojn"
|
||||
|
||||
msgid "-register\t\tRegister this gvim for OLE"
|
||||
msgstr "-register\t\tRegistri tiun gvim al OLE"
|
||||
@ -3397,7 +3420,7 @@ msgid "E296: Seek error in swap file write"
|
||||
msgstr "E296: Eraro de enpoziciigo dum skribo de permutodosiero .swp"
|
||||
|
||||
msgid "E297: Write error in swap file"
|
||||
msgstr "E297: Eraro de skribo en permutodosiero .swp"
|
||||
msgstr "E297: Skriberaro en permutodosiero .swp"
|
||||
|
||||
msgid "E300: Swap file already exists (symlink attack?)"
|
||||
msgstr "E300: Permutodosiero .swp jam ekzistas (ĉu atako per simbola ligilo?)"
|
||||
@ -3537,14 +3560,20 @@ msgstr ""
|
||||
"\n"
|
||||
"(Indas konservi tiun dosieron per alia nomo\n"
|
||||
|
||||
msgid "and run diff with the original file to check for changes)\n"
|
||||
msgstr "kaj lanĉi diff kun la originala dosiero por kontroli la ŝanĝojn)\n"
|
||||
msgid "and run diff with the original file to check for changes)"
|
||||
msgstr "kaj lanĉi diff kun la originala dosiero por kontroli la ŝanĝojn)"
|
||||
|
||||
msgid "Recovery completed. Buffer contents equals file contents."
|
||||
msgstr ""
|
||||
"Restaŭro finiĝis. La enhavo de la bufro samas kun la enhavo de la dosiero."
|
||||
|
||||
msgid ""
|
||||
"Delete the .swp file afterwards.\n"
|
||||
"\n"
|
||||
"You may want to delete the .swp file now.\n"
|
||||
"\n"
|
||||
msgstr ""
|
||||
"Poste forviŝi la permutodosieron .swp.\n"
|
||||
"\n"
|
||||
"La dosiero .swp nun forviŝindas.\n"
|
||||
"\n"
|
||||
|
||||
#. use msg() to start the scrolling properly
|
||||
@ -4074,6 +4103,9 @@ msgstr "lego el kontaktoskatolo de Netbeans"
|
||||
msgid "E658: NetBeans connection lost for buffer %ld"
|
||||
msgstr "E658: Konekto de NetBeans perdita por bufro %ld"
|
||||
|
||||
msgid "E511: netbeans already connected"
|
||||
msgstr "E511: nebeans jam konektata"
|
||||
|
||||
msgid "E505: "
|
||||
msgstr "E505: "
|
||||
|
||||
@ -4236,7 +4268,7 @@ msgid "E518: Unknown option"
|
||||
msgstr "E518: Nekonata opcio"
|
||||
|
||||
msgid "E519: Option not supported"
|
||||
msgstr "E519: Opcio ne subtenita"
|
||||
msgstr "E519: Opcio ne subtenata"
|
||||
|
||||
msgid "E520: Not allowed in a modeline"
|
||||
msgstr "E520: Ne permesita en reĝimlinio"
|
||||
@ -4312,7 +4344,7 @@ msgid "E537: 'commentstring' must be empty or contain %s"
|
||||
msgstr "E537: 'commentstring' devas esti malplena aŭ enhavi %s"
|
||||
|
||||
msgid "E538: No mouse support"
|
||||
msgstr "E538: Neniu muso subtenita"
|
||||
msgstr "E538: Neniu muso subtenata"
|
||||
|
||||
msgid "E540: Unclosed expression sequence"
|
||||
msgstr "E540: '}' mankas"
|
||||
@ -4637,7 +4669,7 @@ msgstr "E374: Mankas ] en formata ĉeno"
|
||||
|
||||
#, c-format
|
||||
msgid "E375: Unsupported %%%c in format string"
|
||||
msgstr "E375: Nesubtenita %%%c en formata ĉeno"
|
||||
msgstr "E375: Nesubtenata %%%c en formata ĉeno"
|
||||
|
||||
#, c-format
|
||||
msgid "E376: Invalid %%%c in format string prefix"
|
||||
@ -4949,11 +4981,11 @@ msgid "E772: Spell file is for newer version of Vim"
|
||||
msgstr "E772: Literuma dosiero estas por pli nova versio de Vim"
|
||||
|
||||
msgid "E770: Unsupported section in spell file"
|
||||
msgstr "E770: Nesubtenita sekcio en literuma dosiero"
|
||||
msgstr "E770: Nesubtenata sekcio en literuma dosiero"
|
||||
|
||||
#, c-format
|
||||
msgid "Warning: region %s not supported"
|
||||
msgstr "Averto: regiono %s ne subtenita"
|
||||
msgstr "Averto: regiono %s ne subtenata"
|
||||
|
||||
#, c-format
|
||||
msgid "Reading affix file %s ..."
|
||||
@ -4965,11 +4997,11 @@ msgstr "Malsukceso dum konverto de vorto en %s linio %d: %s"
|
||||
|
||||
#, c-format
|
||||
msgid "Conversion in %s not supported: from %s to %s"
|
||||
msgstr "Konverto en %s nesubtenita: de %s al %s"
|
||||
msgstr "Konverto en %s nesubtenata: de %s al %s"
|
||||
|
||||
#, c-format
|
||||
msgid "Conversion in %s not supported"
|
||||
msgstr "Konverto en %s nesubtenita"
|
||||
msgstr "Konverto en %s nesubtenata"
|
||||
|
||||
#, c-format
|
||||
msgid "Invalid value for FLAG in %s line %d: %s"
|
||||
@ -5189,7 +5221,7 @@ msgid "E751: Output file name must not have region name"
|
||||
msgstr "E751: Nomo de eliga dosiero ne devas havi nomon de regiono"
|
||||
|
||||
msgid "E754: Only up to 8 regions supported"
|
||||
msgstr "E754: Nur 8 regionoj subtenitaj"
|
||||
msgstr "E754: Nur 8 regionoj subtenataj"
|
||||
|
||||
#, c-format
|
||||
msgid "E755: Invalid region in %s"
|
||||
@ -5589,6 +5621,75 @@ msgstr "Uzis CUT_BUFFER0 anstataŭ malplenan apartigon"
|
||||
msgid "No undo possible; continue anyway"
|
||||
msgstr "Malfaro neebla; daŭrigi tamene"
|
||||
|
||||
#, c-format
|
||||
msgid "E828: Cannot open undo file for writing: %s"
|
||||
msgstr "E828: Ne eblas malfermi la malfaran dosieron por skribi: %s"
|
||||
|
||||
#, c-format
|
||||
msgid "E825: Corrupted undo file (%s): %s"
|
||||
msgstr "E825: Difektita malfara dosiero (%s): %s"
|
||||
|
||||
msgid "Cannot write undo file in any directory in 'undodir'"
|
||||
msgstr "Ne eblis skribi malfaran dosieron en iu dosiero ajn de 'undodir'"
|
||||
|
||||
#, c-format
|
||||
msgid "Will not overwrite with undo file, cannot read: %s"
|
||||
msgstr "Ne superkribos malfaran dosieron, ne eblis legi: %s"
|
||||
|
||||
#, c-format
|
||||
msgid "Will not overwrite, this is not an undo file: %s"
|
||||
msgstr "Ne superskribos, tio ne estas malfara dosiero: %s"
|
||||
|
||||
msgid "Skipping undo file write, nothing to undo"
|
||||
msgstr "Preterpasas skribon de malfara dosiero, nenio por malfari"
|
||||
|
||||
#, c-format
|
||||
msgid "Writing undo file: %s"
|
||||
msgstr "Skribas malfaran dosieron: %s"
|
||||
|
||||
#, c-format
|
||||
msgid "E829: write error in undo file: %s"
|
||||
msgstr "E829: Skriberaro en malfara dosiero: %s"
|
||||
|
||||
#, c-format
|
||||
msgid "Not reading undo file, owner differs: %s"
|
||||
msgstr "Ne legas malfaran dosieron, posedanto malsamas: %s"
|
||||
|
||||
#, c-format
|
||||
msgid "Reading undo file: %s"
|
||||
msgstr "Legado de de malfara dosiero: %s"
|
||||
|
||||
#, c-format
|
||||
msgid "E822: Cannot open undo file for reading: %s"
|
||||
msgstr "E822: Ne eblas malfermi malfaran dosieron por legi: %s"
|
||||
|
||||
#, c-format
|
||||
msgid "E823: Not an undo file: %s"
|
||||
msgstr "E823: Ne estas malfara dosiero: %s"
|
||||
|
||||
#, c-format
|
||||
msgid "E832: Non-encrypted file has encrypted undo file: %s"
|
||||
msgstr "E832: Ne ĉifrata dosiero havas ĉifratan malfaran dosieron: %s"
|
||||
|
||||
#, c-format
|
||||
msgid "E826: Undo file decryption failed: %s"
|
||||
msgstr "E826: Malĉifrado de malfara dosiero fiaskis: %s"
|
||||
|
||||
#, c-format
|
||||
msgid "E827: Undo file is encrypted: %s"
|
||||
msgstr "E827: Malfara dosiero estas ĉifrata: %s"
|
||||
|
||||
#, c-format
|
||||
msgid "E824: Incompatible undo file: %s"
|
||||
msgstr "E824: Malkongrua malfara dosiero: %s"
|
||||
|
||||
msgid "File contents changed, cannot use undo info"
|
||||
msgstr "Enhavo de dosiero ŝanĝiĝis, ne eblas uzi malfarajn infomojn"
|
||||
|
||||
#, c-format
|
||||
msgid "Finished reading undo file %s"
|
||||
msgstr "Finis legi malfaran dosieron %s"
|
||||
|
||||
msgid "Already at oldest change"
|
||||
msgstr "Jam al la plej malnova ŝanĝo"
|
||||
|
||||
@ -5596,8 +5697,8 @@ msgid "Already at newest change"
|
||||
msgstr "Jam al la plej nova ŝanĝo"
|
||||
|
||||
#, c-format
|
||||
msgid "Undo number %ld not found"
|
||||
msgstr "Malfaro numero %ld netrovita"
|
||||
msgid "E830: Undo number %ld not found"
|
||||
msgstr "E830: Malfara numero %ld netrovita"
|
||||
|
||||
msgid "E438: u_undo: line numbers wrong"
|
||||
msgstr "E438: u_undo: nevalidaj numeroj de linioj"
|
||||
@ -6318,7 +6419,7 @@ msgid "E523: Not allowed here"
|
||||
msgstr "E523: Ne permesita tie"
|
||||
|
||||
msgid "E359: Screen mode setting not supported"
|
||||
msgstr "E359: Reĝimo de ekrano ne subtenita"
|
||||
msgstr "E359: Reĝimo de ekrano ne subtenata"
|
||||
|
||||
msgid "E49: Invalid scroll size"
|
||||
msgstr "E49: Nevalida grando de rulumo"
|
||||
@ -6354,7 +6455,7 @@ msgid "E78: Unknown mark"
|
||||
msgstr "E78: Nekonata marko"
|
||||
|
||||
msgid "E79: Cannot expand wildcards"
|
||||
msgstr "E79: Ne eblas ekspansi ĵokerojn"
|
||||
msgstr "E79: Ne eblas malvolvi ĵokerojn"
|
||||
|
||||
msgid "E591: 'winheight' cannot be smaller than 'winminheight'"
|
||||
msgstr "E591: 'winheight' ne rajtas esti malpli ol 'winminheight'"
|
||||
|
164
src/po/fr.po
164
src/po/fr.po
@ -15,14 +15,29 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Vim(Français)\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2010-02-16 21:54+0100\n"
|
||||
"PO-Revision-Date: 2010-02-16 22:10+0100\n"
|
||||
"POT-Creation-Date: 2010-06-12 07:15+0200\n"
|
||||
"PO-Revision-Date: 2010-06-12 07:56+0200\n"
|
||||
"Last-Translator: Dominique Pellé <dominique.pelle@gmail.com>\n"
|
||||
"Language-Team: \n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=ISO_8859-15\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
|
||||
msgid "E831: bf_key_init() called with empty password"
|
||||
msgstr "E831: bf_key_init() appelée avec un mot de passe vide"
|
||||
|
||||
msgid "E820: sizeof(uint32_t) != 4"
|
||||
msgstr "E820: sizeof(uint32_t) != 4"
|
||||
|
||||
msgid "E817: Blowfish big/little endian use wrong"
|
||||
msgstr "E817: petit/gros boutisme incorrect dans blowfish"
|
||||
|
||||
msgid "E818: sha256 test failed"
|
||||
msgstr "E818: le test de sha256 a échoué"
|
||||
|
||||
msgid "E819: Blowfish test failed"
|
||||
msgstr "E819: le test de blowfish a échoué"
|
||||
|
||||
# AB - Il faut respecter l'esprit plus que la lettre.
|
||||
msgid "E82: Cannot allocate any buffer, exiting..."
|
||||
msgstr "E82: Aucun tampon ne peut être alloué, Vim doit s'arrêter"
|
||||
@ -590,7 +605,7 @@ msgid "E723: Missing end of Dictionary '}': %s"
|
||||
msgstr "E723: Il manque '}' à la fin du Dictionnaire %s"
|
||||
|
||||
msgid "E724: variable nested too deep for displaying"
|
||||
msgstr "E724: variable trop imbriquée pour être afficher"
|
||||
msgstr "E724: variable trop imbriquée pour être affichée"
|
||||
|
||||
#, c-format
|
||||
msgid "E740: Too many arguments for function %s"
|
||||
@ -840,7 +855,6 @@ msgstr "E133: :return en dehors d'une fonction"
|
||||
|
||||
# AB - La version française est capitalisée pour être en accord avec les autres
|
||||
# commentaires enregistrés dans le fichier viminfo.
|
||||
#, c-format
|
||||
msgid ""
|
||||
"\n"
|
||||
"# global variables:\n"
|
||||
@ -1113,7 +1127,7 @@ msgstr "E148: :global doit
|
||||
# qui est utilisé.
|
||||
#, c-format
|
||||
msgid "Pattern found in every line: %s"
|
||||
msgstr "Motif trouvé dans toutes les ligne : %s"
|
||||
msgstr "Motif trouvé dans toutes les lignes : %s"
|
||||
|
||||
# AB - Ne pas traduire le dollar.
|
||||
# AB - Ce message n'est volontairement pas traduit. En effet, il fait partie
|
||||
@ -1251,8 +1265,8 @@ msgstr "Aucun point d'arr
|
||||
msgid "%3d %s %s line %ld"
|
||||
msgstr "%3d %s %s ligne %ld"
|
||||
|
||||
msgid "E750: First use :profile start <fname>"
|
||||
msgstr "E750: Utilisez d'abord :profile start <nomfichier>"
|
||||
msgid "E750: First use \":profile start {fname}\""
|
||||
msgstr "E750: Utilisez d'abord \":profile start {nomfichier}\""
|
||||
|
||||
# AB - "changes to" est redondant et a été omis de la version française.
|
||||
#, c-format
|
||||
@ -1465,6 +1479,9 @@ msgstr "E468: Seul le compl
|
||||
msgid "E467: Custom completion requires a function argument"
|
||||
msgstr "E467: Le complètement personnalisé requiert une fonction en argument"
|
||||
|
||||
msgid "unknown"
|
||||
msgstr "inconnu"
|
||||
|
||||
#, c-format
|
||||
msgid "E185: Cannot find color scheme %s"
|
||||
msgstr "E185: Impossible de trouver le jeu de couleurs %s"
|
||||
@ -1732,7 +1749,7 @@ msgid "E198: cmd_pchar beyond the command length"
|
||||
msgstr "E198: cmd_pchar au-delà de la longueur de la commande"
|
||||
|
||||
msgid "E199: Active window or buffer deleted"
|
||||
msgstr "E199: Tampon ou fenêtre active effacé(e)"
|
||||
msgstr "E199: Fenêtre ou tampon actif effacé"
|
||||
|
||||
msgid "E812: Autocommands changed buffer or buffer name"
|
||||
msgstr "E812: Des autocommandes on changé le tampon ou le nom du tampon"
|
||||
@ -1830,6 +1847,9 @@ msgstr "La conversion avec 'charconvert' a
|
||||
msgid "can't read output of 'charconvert'"
|
||||
msgstr "Impossible de lire la sortie de 'charconvert'"
|
||||
|
||||
msgid "E821: File is encrypted with unknown method"
|
||||
msgstr "E821: Le fichier est chiffré avec une méthode inconnue"
|
||||
|
||||
msgid "E676: No matching autocommands for acwrite buffer"
|
||||
msgstr "E676: Pas d'autocommande correspondante pour le tampon acwrite"
|
||||
|
||||
@ -1898,15 +1918,15 @@ msgstr "E512: Erreur de fermeture de fichier"
|
||||
|
||||
msgid "E513: write error, conversion failed (make 'fenc' empty to override)"
|
||||
msgstr ""
|
||||
"E513: Erreur d'écriture, échec de conversion (videz 'fenc' pour passer "
|
||||
"outre)"
|
||||
"E513: Erreur d'écriture, échec de conversion (videz 'fenc' pour passer outre)"
|
||||
|
||||
#, c-format
|
||||
msgid ""
|
||||
"E513: write error, conversion failed in line %ld (make 'fenc' empty to "
|
||||
"override)"
|
||||
msgstr ""
|
||||
"E513: Erreur d'écriture, échec de conversion à la ligne %ld (videz 'fenc' pour passer outre)"
|
||||
"E513: Erreur d'écriture, échec de conversion à la ligne %ld (videz 'fenc' "
|
||||
"pour passer outre)"
|
||||
|
||||
msgid "E514: write error (file system full?)"
|
||||
msgstr "E514: erreur d'écriture (système de fichiers plein ?)"
|
||||
@ -1986,6 +2006,10 @@ msgstr "%ld lignes, "
|
||||
msgid "1 character"
|
||||
msgstr "1 caractère"
|
||||
|
||||
#, c-format
|
||||
msgid "%lld characters"
|
||||
msgstr "%lld caractères"
|
||||
|
||||
#, c-format
|
||||
msgid "%ld characters"
|
||||
msgstr "%ld caractères"
|
||||
@ -2657,15 +2681,15 @@ msgstr "E623: Impossible d'engendrer le processus cscope"
|
||||
msgid "E567: no cscope connections"
|
||||
msgstr "E567: Aucune connexion cscope"
|
||||
|
||||
#, c-format
|
||||
msgid "E469: invalid cscopequickfix flag %c for %c"
|
||||
msgstr "E469: Drapeau cscopequickfix %c invalide pour %c"
|
||||
|
||||
# DB - todo
|
||||
#, c-format
|
||||
msgid "E259: no matches found for cscope query %s of %s"
|
||||
msgstr "E259: aucune correspondance trouvée pour la requête cscope %s de %s"
|
||||
|
||||
#, c-format
|
||||
msgid "E469: invalid cscopequickfix flag %c for %c"
|
||||
msgstr "E469: Drapeau cscopequickfix %c invalide pour %c"
|
||||
|
||||
msgid "cscope commands:\n"
|
||||
msgstr "commandes cscope :\n"
|
||||
|
||||
@ -3097,6 +3121,9 @@ msgstr "Argument invalide pour"
|
||||
msgid "%d files to edit\n"
|
||||
msgstr "%d fichiers à éditer\n"
|
||||
|
||||
msgid "netbeans is not supported with this GUI\n"
|
||||
msgstr "netbeans n'est pas supporté avec cette interface graphique\n"
|
||||
|
||||
msgid "This Vim was not compiled with the diff feature."
|
||||
msgstr "Ce Vim n'a pas été compilé avec la fonctionnalité diff"
|
||||
|
||||
@ -3371,7 +3398,9 @@ msgid "--servername <name>\tSend to/become the Vim server <name>"
|
||||
msgstr "--servername <nom>\tEnvoyer au/devenir le serveur Vim nommé <nom>"
|
||||
|
||||
msgid "--startuptime <file>\tWrite startup timing messages to <file>"
|
||||
msgstr "--startuptime <fich>\tÉcrire les messages d'horodatage au démarrage dans <fich>"
|
||||
msgstr ""
|
||||
"--startuptime <fich>\tÉcrire les messages d'horodatage au démarrage dans "
|
||||
"<fich>"
|
||||
|
||||
msgid "-i <viminfo>\t\tUse <viminfo> instead of .viminfo"
|
||||
msgstr "-i <viminfo>\t\tUtiliser <viminfo> au lieu du viminfo habituel"
|
||||
@ -3759,15 +3788,20 @@ msgstr ""
|
||||
"\n"
|
||||
"(Vous voudrez peut-être enregistrer ce fichier sous un autre nom\n"
|
||||
|
||||
msgid "and run diff with the original file to check for changes)\n"
|
||||
msgid "and run diff with the original file to check for changes)"
|
||||
msgstr ""
|
||||
"et lancer diff avec le fichier original pour repérer les changements)\n"
|
||||
"et lancer diff avec le fichier original pour repérer les changements)"
|
||||
|
||||
msgid "Recovery completed. Buffer contents equals file contents."
|
||||
msgstr "Récupération achevée. Le contenu du tampon est identique au contenu du fichier."
|
||||
|
||||
msgid ""
|
||||
"Delete the .swp file afterwards.\n"
|
||||
"\n"
|
||||
"You may want to delete the .swp file now.\n"
|
||||
"\n"
|
||||
msgstr ""
|
||||
"Effacez ensuite le fichier .swp.\n"
|
||||
"\n"
|
||||
"Il est conseillé d'effacer maintenant le fichier .swp.\n"
|
||||
"\n"
|
||||
|
||||
#. use msg() to start the scrolling properly
|
||||
@ -4299,6 +4333,9 @@ msgstr "read sur la socket Netbeans"
|
||||
msgid "E658: NetBeans connection lost for buffer %ld"
|
||||
msgstr "E658: Connexion NetBeans perdue pour le tampon %ld"
|
||||
|
||||
msgid "E511: netbeans already connected"
|
||||
msgstr "E511: netbeans déjà connecté"
|
||||
|
||||
msgid "E505: "
|
||||
msgstr "E505: "
|
||||
|
||||
@ -5376,7 +5413,7 @@ msgstr "Trop de r
|
||||
|
||||
#, c-format
|
||||
msgid "/ line ignored in %s line %d: %s"
|
||||
msgstr "Ligne / ignorée dans %s ligen %d : %s"
|
||||
msgstr "Ligne / ignorée dans %s ligne %d : %s"
|
||||
|
||||
#, c-format
|
||||
msgid "Invalid region nr in %s line %d: %s"
|
||||
@ -5599,7 +5636,7 @@ msgid "E399: Not enough arguments: syntax region %s"
|
||||
msgstr "E399: Pas assez d'arguments : syntax region %s"
|
||||
|
||||
msgid "E400: No cluster specified"
|
||||
msgstr "E400: Aucun grappe spécifiée"
|
||||
msgstr "E400: Aucune grappe spécifiée"
|
||||
|
||||
#, c-format
|
||||
msgid "E401: Pattern delimiter not found: %s"
|
||||
@ -5834,6 +5871,77 @@ msgstr "CUT_BUFFER0 utilis
|
||||
msgid "No undo possible; continue anyway"
|
||||
msgstr "Annulation impossible ; continuer"
|
||||
|
||||
#, c-format
|
||||
msgid "E828: Cannot open undo file for writing: %s"
|
||||
msgstr "E828: Impossible d'ouvrir le fichier d'annulations en écriture : %s"
|
||||
|
||||
#, c-format
|
||||
msgid "E825: Corrupted undo file (%s): %s"
|
||||
msgstr "E825: Fichier d'annulations corrompu (%s) : %s"
|
||||
|
||||
msgid "Cannot write undo file in any directory in 'undodir'"
|
||||
msgstr "Impossible d'écrire le fichier d'annulations dans n'importe "
|
||||
"quel répertoire de 'undodir'"
|
||||
|
||||
#, c-format
|
||||
msgid "Will not overwrite with undo file, cannot read: %s"
|
||||
msgstr "Le fichier d'annulations de sera pas écrasé, impossible de lire : %s"
|
||||
|
||||
#, c-format
|
||||
msgid "Will not overwrite, this is not an undo file: %s"
|
||||
msgstr "Fichier ne sera pas écrasé, ce n'est pas un fichier d'annulations : %s"
|
||||
|
||||
msgid "Skipping undo file write, nothing to undo"
|
||||
msgstr "Le fichier d'annulations n'est pas écrit, rien à annuler"
|
||||
|
||||
#, c-format
|
||||
msgid "Writing undo file: %s"
|
||||
msgstr "Écriture du fichier d'annulations : %s"
|
||||
|
||||
#, c-format
|
||||
msgid "E829: write error in undo file: %s"
|
||||
msgstr "E829: Erreur d'écriture dans le fichier d'annulations : %s"
|
||||
|
||||
#, c-format
|
||||
msgid "Not reading undo file, owner differs: %s"
|
||||
msgstr "Le fichier d'annulations n'est pas lu, propriétaire différent : %s"
|
||||
|
||||
#, c-format
|
||||
msgid "Reading undo file: %s"
|
||||
msgstr "Lecture du fichier d'annulations : %s..."
|
||||
|
||||
#, c-format
|
||||
msgid "E822: Cannot open undo file for reading: %s"
|
||||
msgstr "E822: Impossible d'ouvrir le fichier d'annulations en lecture : %s"
|
||||
|
||||
#, c-format
|
||||
msgid "E823: Not an undo file: %s"
|
||||
msgstr "E823: Ce n'est pas un fichier d'annulations : %s"
|
||||
|
||||
#, c-format
|
||||
msgid "E832: Non-encrypted file has encrypted undo file: %s"
|
||||
msgstr "E832: Fichier non-chiffré a un fichier d'annulations chiffré : %s"
|
||||
|
||||
#, c-format
|
||||
msgid "E826: Undo file decryption failed: %s"
|
||||
msgstr "E826: Déchiffrage du fichier d'annulation a échoué : %s"
|
||||
|
||||
#, c-format
|
||||
msgid "E827: Undo file is encrypted: %s"
|
||||
msgstr "E827: Le fichier d'annulations est chiffré : %s"
|
||||
|
||||
#, c-format
|
||||
msgid "E824: Incompatible undo file: %s"
|
||||
msgstr "E824: Fichier d'annulations incompatible : %s"
|
||||
|
||||
msgid "File contents changed, cannot use undo info"
|
||||
msgstr "Le contenu du fichier a changé, impossible d'utiliser les "
|
||||
"informations d'annulation"
|
||||
|
||||
#, c-format
|
||||
msgid "Finished reading undo file %s"
|
||||
msgstr "Fin de lecture du fichier d'annulations %s"
|
||||
|
||||
msgid "Already at oldest change"
|
||||
msgstr "Déjà à la modification la plus ancienne"
|
||||
|
||||
@ -5841,8 +5949,8 @@ msgid "Already at newest change"
|
||||
msgstr "Déjà à la modification la plus récente"
|
||||
|
||||
#, c-format
|
||||
msgid "Undo number %ld not found"
|
||||
msgstr "L'annulation n° %ld introuvable"
|
||||
msgid "E830: Undo number %ld not found"
|
||||
msgstr "E830: Annulation n° %ld introuvable"
|
||||
|
||||
msgid "E438: u_undo: line numbers wrong"
|
||||
msgstr "E438: u_undo : numéros de ligne erronés"
|
||||
@ -6535,7 +6643,7 @@ msgid "E776: No location list"
|
||||
msgstr "E776: Aucune liste d'emplacements"
|
||||
|
||||
msgid "E43: Damaged match string"
|
||||
msgstr "E43: Le chaîne de recherche est endommagée"
|
||||
msgstr "E43: La chaîne de recherche est endommagée"
|
||||
|
||||
msgid "E44: Corrupted regexp program"
|
||||
msgstr "E44: L'automate de regexp est corrompu"
|
||||
@ -6650,9 +6758,3 @@ msgstr "La recherche a atteint le HAUT, et continue en BAS"
|
||||
|
||||
msgid "search hit BOTTOM, continuing at TOP"
|
||||
msgstr "La recherche a atteint le BAS, et continue en HAUT"
|
||||
|
||||
#~ msgid "E569: maximum number of cscope connections reached"
|
||||
#~ msgstr "E569: nombre maximum de connexions cscope atteint"
|
||||
|
||||
#~ msgid "[NL found]"
|
||||
#~ msgstr "[NL trouvé]"
|
||||
|
@ -149,7 +149,7 @@ void qsort __ARGS((void *base, size_t elm_count, size_t elm_size, int (*cmp)(con
|
||||
# endif
|
||||
# include "regexp.pro"
|
||||
# include "screen.pro"
|
||||
# ifdef FEAT_CRYPT
|
||||
# if defined(FEAT_CRYPT) || defined(FEAT_PERSISTENT_UNDO)
|
||||
# include "sha256.pro"
|
||||
# endif
|
||||
# include "search.pro"
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* blowfish.c */
|
||||
void bf_key_init __ARGS((char_u *password));
|
||||
void bf_key_init __ARGS((char_u *password, char_u *salt, int salt_len));
|
||||
void bf_ofb_init __ARGS((char_u *iv, int iv_len));
|
||||
void bf_crypt_encode __ARGS((char_u *from, size_t len, char_u *to));
|
||||
void bf_crypt_decode __ARGS((char_u *ptr, long len));
|
||||
|
@ -2,7 +2,7 @@
|
||||
void sha256_start __ARGS((context_sha256_T *ctx));
|
||||
void sha256_update __ARGS((context_sha256_T *ctx, char_u *input, UINT32_T length));
|
||||
void sha256_finish __ARGS((context_sha256_T *ctx, char_u digest[32]));
|
||||
char_u *sha256_key __ARGS((char_u *buf));
|
||||
char_u *sha256_key __ARGS((char_u *buf, char_u *salt, int salt_len));
|
||||
int sha256_self_test __ARGS((void));
|
||||
void sha2_seed __ARGS((char_u header[], int header_len));
|
||||
void sha2_seed __ARGS((char_u header[], int header_len, char_u salt[], int salt_len));
|
||||
/* vim: set ft=c : */
|
||||
|
50
src/sha256.c
50
src/sha256.c
@ -23,9 +23,6 @@
|
||||
#if defined(FEAT_CRYPT) || defined(FEAT_PERSISTENT_UNDO)
|
||||
|
||||
static void sha256_process __ARGS((context_sha256_T *ctx, char_u data[64]));
|
||||
static char_u *sha256_bytes __ARGS((char_u *buf, int buflen));
|
||||
static unsigned int get_some_time __ARGS((void));
|
||||
|
||||
|
||||
#define GET_UINT32(n, b, i) \
|
||||
{ \
|
||||
@ -271,14 +268,22 @@ sha256_finish(ctx, digest)
|
||||
PUT_UINT32(ctx->state[6], digest, 24);
|
||||
PUT_UINT32(ctx->state[7], digest, 28);
|
||||
}
|
||||
#endif /* FEAT_CRYPT || FEAT_PERSISTENT_UNDO */
|
||||
|
||||
#if defined(FEAT_CRYPT) || defined(PROTO)
|
||||
static char_u *sha256_bytes __ARGS((char_u *buf, int buf_len, char_u *salt, int salt_len));
|
||||
static unsigned int get_some_time __ARGS((void));
|
||||
|
||||
/*
|
||||
* Returns hex digest of "buf[buflen]" in a static array.
|
||||
* Returns hex digest of "buf[buf_len]" in a static array.
|
||||
* if "salt" is not NULL also do "salt[salt_len]".
|
||||
*/
|
||||
static char_u *
|
||||
sha256_bytes(buf, buflen)
|
||||
sha256_bytes(buf, buf_len, salt, salt_len)
|
||||
char_u *buf;
|
||||
int buflen;
|
||||
int buf_len;
|
||||
char_u *salt;
|
||||
int salt_len;
|
||||
{
|
||||
char_u sha256sum[32];
|
||||
static char_u hexit[65];
|
||||
@ -288,7 +293,9 @@ sha256_bytes(buf, buflen)
|
||||
sha256_self_test();
|
||||
|
||||
sha256_start(&ctx);
|
||||
sha256_update(&ctx, buf, buflen);
|
||||
sha256_update(&ctx, buf, buf_len);
|
||||
if (salt != NULL)
|
||||
sha256_update(&ctx, salt, salt_len);
|
||||
sha256_finish(&ctx, sha256sum);
|
||||
for (j = 0; j < 32; j++)
|
||||
sprintf((char *)hexit + j * 2, "%02x", sha256sum[j]);
|
||||
@ -300,14 +307,16 @@ sha256_bytes(buf, buflen)
|
||||
* Returns sha256(buf) as 64 hex chars in static array.
|
||||
*/
|
||||
char_u *
|
||||
sha256_key(buf)
|
||||
sha256_key(buf, salt, salt_len)
|
||||
char_u *buf;
|
||||
char_u *salt;
|
||||
int salt_len;
|
||||
{
|
||||
/* No passwd means don't encrypt */
|
||||
if (buf == NULL || *buf == NUL)
|
||||
return (char_u *)"";
|
||||
|
||||
return sha256_bytes(buf, (int)STRLEN(buf));
|
||||
return sha256_bytes(buf, (int)STRLEN(buf), salt, salt_len);
|
||||
}
|
||||
|
||||
/*
|
||||
@ -354,7 +363,8 @@ sha256_self_test()
|
||||
if (i < 2)
|
||||
{
|
||||
hexit = sha256_bytes((char_u *)sha_self_test_msg[i],
|
||||
(int)STRLEN(sha_self_test_msg[i]));
|
||||
(int)STRLEN(sha_self_test_msg[i]),
|
||||
NULL, 0);
|
||||
STRCPY(output, hexit);
|
||||
}
|
||||
else
|
||||
@ -380,29 +390,32 @@ sha256_self_test()
|
||||
static unsigned int
|
||||
get_some_time()
|
||||
{
|
||||
#ifdef HAVE_GETTIMEOFDAY
|
||||
# ifdef HAVE_GETTIMEOFDAY
|
||||
struct timeval tv;
|
||||
|
||||
/* Using usec makes it less predictable. */
|
||||
gettimeofday(&tv, NULL);
|
||||
return (unsigned int)(tv.tv_sec + tv.tv_usec);
|
||||
#else
|
||||
# else
|
||||
return (unsigned int)time(NULL);
|
||||
#endif
|
||||
# endif
|
||||
}
|
||||
|
||||
/*
|
||||
* set header = sha2_seed(random_data);
|
||||
*/
|
||||
void
|
||||
sha2_seed(header, header_len)
|
||||
char_u header[];
|
||||
sha2_seed(header, header_len, salt, salt_len)
|
||||
char_u *header;
|
||||
int header_len;
|
||||
char_u *salt;
|
||||
int salt_len;
|
||||
{
|
||||
int i;
|
||||
static char_u random_data[1000];
|
||||
char_u sha256sum[32];
|
||||
context_sha256_T ctx;
|
||||
|
||||
srand(get_some_time());
|
||||
|
||||
for (i = 0; i < (int)sizeof(random_data) - 1; i++)
|
||||
@ -411,8 +424,13 @@ sha2_seed(header, header_len)
|
||||
sha256_update(&ctx, (char_u *)random_data, sizeof(random_data));
|
||||
sha256_finish(&ctx, sha256sum);
|
||||
|
||||
/* put first block into header. */
|
||||
for (i = 0; i < header_len; i++)
|
||||
header[i] = sha256sum[i % sizeof(sha256sum)];
|
||||
|
||||
/* put remaining block into salt. */
|
||||
for (i = 0; i < salt_len; i++)
|
||||
salt[i] = sha256sum[(i + header_len) % sizeof(sha256sum)];
|
||||
}
|
||||
|
||||
#endif /* FEAT_CRYPT || FEAT_PERSISTENT_UNDO */
|
||||
#endif /* FEAT_CRYPT */
|
||||
|
@ -71,5 +71,5 @@ VimCrypt~01!lV'
|
||||
end of cm=0 bytes
|
||||
|
||||
start of cm=1 bytes
|
||||
VimCrypt~02!¨Ò9ZšÙ¢èì”F¼èÃ[,ì”F¼ƒ€z¼Ö軂y¾Ô(
|
||||
VimCrypt~02!k)╬≈#щS°У=╨Юх#╔M╢├JцAм╔M╢├!─⌡УАр┌≤В
з
|
||||
end of cm=1 bytes
|
||||
|
Loading…
x
Reference in New Issue
Block a user