Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<libcryptsetup.h>
- #include<stdio.h>
- int main( int argc,char * argv[] )
- {
- const char * mapper = argv[1] ;
- struct crypt_device * cd;
- if( crypt_init_by_name( &cd,mapper ) != 0 ){
- puts( "crypt_init_by_name() failed" ) ;
- return 1 ;
- }
- const char * cipher = crypt_get_cipher_mode( cd ) ;
- if( cipher == NULL ){
- puts( "cipher: (NULL)" ) ;
- }else{
- printf( "cipher: %s\n",cipher ) ;
- }
- crypt_free( cd );
- return 0 ;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement