Advertisement
mhogomchungu

Untitled

Feb 19th, 2013
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1.  
  2. #include<libcryptsetup.h>
  3. #include<stdio.h>
  4. int main( int argc,char * argv[] )
  5. {
  6. const char * mapper = argv[1] ;
  7.  
  8. struct crypt_device * cd;
  9.  
  10. if( crypt_init_by_name( &cd,mapper ) != 0 ){
  11. puts( "crypt_init_by_name() failed" ) ;
  12. return 1 ;
  13. }
  14.  
  15. const char * cipher = crypt_get_cipher_mode( cd ) ;
  16.  
  17. if( cipher == NULL ){
  18. puts( "cipher: (NULL)" ) ;
  19. }else{
  20. printf( "cipher: %s\n",cipher ) ;
  21. }
  22.  
  23. crypt_free( cd );
  24. return 0 ;
  25. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement