Advertisement
dllbridge

Example for wla_lib

Apr 16th, 2022
998
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.97 KB | None | 0 0
  1. #include       <stdio.h>
  2. #include     "asm_Lib/wla_lib.h"
  3.  
  4.  
  5.  
  6. char   sz[123] = "abc_SONY",
  7.      *psz;
  8.  
  9. int  nLen = 3,
  10.      arr[800];
  11.  
  12. ////////////////////////////////////////////////////
  13. int main()                                        //
  14. {
  15.  
  16.  
  17.     printf("hash SHA-256 for \"abc_SONY\": \n");
  18.     nLen = _wla_strlen(sz);
  19.     psz  = _sha_256(sz, nLen);   //  вычисляем ХЭШ строки
  20.  
  21.     printf("%s\n\n",   psz);
  22.  
  23.     int a = 0;
  24.  
  25.     for(int i1= 0; i1< 17; i1++)
  26.     {
  27.         for(int i = 0; i < 12; i ++)
  28.         {
  29.             nLen = _wla_RND();
  30.             printf("%5d ", nLen);  arr[a++] = nLen;    
  31.         }   printf("\n");  
  32.     }
  33.  
  34.    _wla_SortInsLess(arr, a);  //  Сортировка вставками
  35.  
  36.      
  37.     printf("- - - - - - - - - - - After sorting:");
  38.     printf(" - - - - - - - - - - - - - - - - -\n");
  39.     a = 0;
  40.     for(int i1= 0; i1< 17; i1++)
  41.     {
  42.         for(int i = 0; i < 12; i ++)
  43.         {
  44.            
  45.             printf("%5d ", arr[a++]);          
  46.         }   printf("\n");  
  47.     }
  48. }
  49.  
  50.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement