/usr/share/doc/libghc-bindings-nettle-doc/html/src/Bindings-Nettle-Cipher-DES.html is in libghc-bindings-nettle-doc 0.1.1-1build1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 | <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<!-- Generated by HsColour, http://code.haskell.org/~malcolm/hscolour/ -->
<title>dist-ghc/build/Bindings/Nettle/Cipher/DES.hs</title>
<link type='text/css' rel='stylesheet' href='hscolour.css' />
</head>
<body>
<pre><a name="line-1"></a><span class='hs-comment'>{-# LINE 1 "Bindings/Nettle/Cipher/DES.hsc" #-}</span>
<a name="line-2"></a><span class='hs-comment'>{-# LANGUAGE ForeignFunctionInterface #-}</span>
<a name="line-3"></a><span class='hs-comment'>{-# LINE 2 "Bindings/Nettle/Cipher/DES.hsc" #-}</span>
<a name="line-4"></a>
<a name="line-5"></a>
<a name="line-6"></a><span class='hs-comment'>{-# LINE 4 "Bindings/Nettle/Cipher/DES.hsc" #-}</span>
<a name="line-7"></a>
<a name="line-8"></a><span class='hs-comment'>{-# LINE 5 "Bindings/Nettle/Cipher/DES.hsc" #-}</span>
<a name="line-9"></a>
<a name="line-10"></a><span class='hs-keyword'>module</span> <span class='hs-conid'>Bindings</span><span class='hs-varop'>.</span><span class='hs-conid'>Nettle</span><span class='hs-varop'>.</span><span class='hs-conid'>Cipher</span><span class='hs-varop'>.</span><span class='hs-conid'>DES</span> <span class='hs-keyword'>where</span>
<a name="line-11"></a><span class='hs-keyword'>import</span> <span class='hs-conid'>Foreign</span><span class='hs-varop'>.</span><span class='hs-conid'>Ptr</span> <span class='hs-layout'>(</span><span class='hs-conid'>Ptr</span><span class='hs-layout'>,</span><span class='hs-conid'>FunPtr</span><span class='hs-layout'>,</span><span class='hs-varid'>plusPtr</span><span class='hs-layout'>)</span>
<a name="line-12"></a><span class='hs-keyword'>import</span> <span class='hs-conid'>Foreign</span><span class='hs-varop'>.</span><span class='hs-conid'>Ptr</span> <span class='hs-layout'>(</span><span class='hs-varid'>wordPtrToPtr</span><span class='hs-layout'>,</span><span class='hs-varid'>castPtrToFunPtr</span><span class='hs-layout'>)</span>
<a name="line-13"></a><span class='hs-keyword'>import</span> <span class='hs-conid'>Foreign</span><span class='hs-varop'>.</span><span class='hs-conid'>Storable</span>
<a name="line-14"></a><span class='hs-keyword'>import</span> <span class='hs-conid'>Foreign</span><span class='hs-varop'>.</span><span class='hs-conid'>C</span><span class='hs-varop'>.</span><span class='hs-conid'>Types</span>
<a name="line-15"></a><span class='hs-keyword'>import</span> <span class='hs-conid'>Foreign</span><span class='hs-varop'>.</span><span class='hs-conid'>C</span><span class='hs-varop'>.</span><span class='hs-conid'>String</span> <span class='hs-layout'>(</span><span class='hs-conid'>CString</span><span class='hs-layout'>,</span><span class='hs-conid'>CStringLen</span><span class='hs-layout'>,</span><span class='hs-conid'>CWString</span><span class='hs-layout'>,</span><span class='hs-conid'>CWStringLen</span><span class='hs-layout'>)</span>
<a name="line-16"></a><span class='hs-keyword'>import</span> <span class='hs-conid'>Foreign</span><span class='hs-varop'>.</span><span class='hs-conid'>Marshal</span><span class='hs-varop'>.</span><span class='hs-conid'>Alloc</span> <span class='hs-layout'>(</span><span class='hs-varid'>alloca</span><span class='hs-layout'>)</span>
<a name="line-17"></a><span class='hs-keyword'>import</span> <span class='hs-conid'>Foreign</span><span class='hs-varop'>.</span><span class='hs-conid'>Marshal</span><span class='hs-varop'>.</span><span class='hs-conid'>Array</span> <span class='hs-layout'>(</span><span class='hs-varid'>peekArray</span><span class='hs-layout'>,</span><span class='hs-varid'>pokeArray</span><span class='hs-layout'>)</span>
<a name="line-18"></a><span class='hs-keyword'>import</span> <span class='hs-conid'>Data</span><span class='hs-varop'>.</span><span class='hs-conid'>Int</span>
<a name="line-19"></a><span class='hs-keyword'>import</span> <span class='hs-conid'>Data</span><span class='hs-varop'>.</span><span class='hs-conid'>Word</span>
<a name="line-20"></a>
<a name="line-21"></a><span class='hs-comment'>{-# LINE 8 "Bindings/Nettle/Cipher/DES.hsc" #-}</span>
<a name="line-22"></a>
<a name="line-23"></a><a name="c'DES_BLOCK_SIZE"></a><span class='hs-definition'>c'DES_BLOCK_SIZE</span> <span class='hs-keyglyph'>=</span> <span class='hs-num'>8</span>
<a name="line-24"></a><span class='hs-definition'>c'DES_BLOCK_SIZE</span> <span class='hs-keyglyph'>::</span> <span class='hs-layout'>(</span><span class='hs-conid'>Num</span> <span class='hs-varid'>a</span><span class='hs-layout'>)</span> <span class='hs-keyglyph'>=></span> <span class='hs-varid'>a</span>
<a name="line-25"></a>
<a name="line-26"></a><a name="c'DES_KEY_SIZE"></a><span class='hs-comment'>{-# LINE 10 "Bindings/Nettle/Cipher/DES.hsc" #-}</span>
<a name="line-27"></a><span class='hs-definition'>c'DES_KEY_SIZE</span> <span class='hs-keyglyph'>=</span> <span class='hs-num'>8</span>
<a name="line-28"></a><span class='hs-definition'>c'DES_KEY_SIZE</span> <span class='hs-keyglyph'>::</span> <span class='hs-layout'>(</span><span class='hs-conid'>Num</span> <span class='hs-varid'>a</span><span class='hs-layout'>)</span> <span class='hs-keyglyph'>=></span> <span class='hs-varid'>a</span>
<a name="line-29"></a>
<a name="line-30"></a><span class='hs-comment'>{-# LINE 11 "Bindings/Nettle/Cipher/DES.hsc" #-}</span>
<a name="line-31"></a>
<a name="line-32"></a>
<a name="line-33"></a><a name="C'des_ctx"></a><span class='hs-comment'>{-# LINE 13 "Bindings/Nettle/Cipher/DES.hsc" #-}</span>
<a name="line-34"></a><a name="C'des_ctx"></a><span class='hs-keyword'>data</span> <span class='hs-conid'>C'des_ctx</span> <span class='hs-keyglyph'>=</span> <span class='hs-conid'>C'des_ctx</span><span class='hs-layout'>{</span>
<a name="line-35"></a><span class='hs-layout'>}</span> <span class='hs-keyword'>deriving</span> <span class='hs-layout'>(</span><span class='hs-conid'>Eq</span><span class='hs-layout'>,</span><span class='hs-conid'>Show</span><span class='hs-layout'>)</span>
<a name="line-36"></a><a name="instance%20Storable%20C'des_ctx"></a><span class='hs-keyword'>instance</span> <span class='hs-conid'>Storable</span> <span class='hs-conid'>C'des_ctx</span> <span class='hs-keyword'>where</span>
<a name="line-37"></a> <span class='hs-varid'>sizeOf</span> <span class='hs-keyword'>_</span> <span class='hs-keyglyph'>=</span> <span class='hs-num'>128</span>
<a name="line-38"></a> <span class='hs-varid'>alignment</span> <span class='hs-keyword'>_</span> <span class='hs-keyglyph'>=</span> <span class='hs-num'>4</span>
<a name="line-39"></a> <span class='hs-varid'>peek</span> <span class='hs-varid'>p</span> <span class='hs-keyglyph'>=</span> <span class='hs-keyword'>do</span>
<a name="line-40"></a> <span class='hs-varid'>return</span> <span class='hs-varop'>$</span> <span class='hs-conid'>C'des_ctx</span>
<a name="line-41"></a> <span class='hs-varid'>poke</span> <span class='hs-varid'>p</span> <span class='hs-layout'>(</span><span class='hs-conid'>C'des_ctx</span><span class='hs-layout'>)</span> <span class='hs-keyglyph'>=</span> <span class='hs-keyword'>do</span>
<a name="line-42"></a> <span class='hs-varid'>return</span> <span class='hs-conid'>()</span>
<a name="line-43"></a>
<a name="line-44"></a><span class='hs-comment'>{-# LINE 14 "Bindings/Nettle/Cipher/DES.hsc" #-}</span>
<a name="line-45"></a>
<a name="line-46"></a><span class='hs-keyword'>foreign</span> <span class='hs-keyword'>import</span> <span class='hs-keyword'>ccall</span> <span class='hs-str'>"nettle_des_set_key"</span> <span class='hs-varid'>c'nettle_des_set_key</span>
<a name="line-47"></a> <span class='hs-keyglyph'>::</span> <span class='hs-conid'>Ptr</span> <span class='hs-conid'>C'des_ctx</span> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>Ptr</span> <span class='hs-conid'>CUChar</span> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>IO</span> <span class='hs-conid'>()</span>
<a name="line-48"></a><span class='hs-keyword'>foreign</span> <span class='hs-keyword'>import</span> <span class='hs-keyword'>ccall</span> <span class='hs-str'>"&nettle_des_set_key"</span> <span class='hs-varid'>p'nettle_des_set_key</span>
<a name="line-49"></a> <span class='hs-keyglyph'>::</span> <span class='hs-conid'>FunPtr</span> <span class='hs-layout'>(</span><span class='hs-conid'>Ptr</span> <span class='hs-conid'>C'des_ctx</span> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>Ptr</span> <span class='hs-conid'>CUChar</span> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>IO</span> <span class='hs-conid'>()</span><span class='hs-layout'>)</span>
<a name="line-50"></a>
<a name="line-51"></a><span class='hs-comment'>{-# LINE 16 "Bindings/Nettle/Cipher/DES.hsc" #-}</span>
<a name="line-52"></a><span class='hs-keyword'>foreign</span> <span class='hs-keyword'>import</span> <span class='hs-keyword'>ccall</span> <span class='hs-str'>"nettle_des_encrypt"</span> <span class='hs-varid'>c'nettle_des_encrypt</span>
<a name="line-53"></a> <span class='hs-keyglyph'>::</span> <span class='hs-conid'>Ptr</span> <span class='hs-conid'>C'des_ctx</span> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>CUInt</span> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>Ptr</span> <span class='hs-conid'>CUChar</span> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>Ptr</span> <span class='hs-conid'>CUChar</span> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>IO</span> <span class='hs-conid'>()</span>
<a name="line-54"></a><span class='hs-keyword'>foreign</span> <span class='hs-keyword'>import</span> <span class='hs-keyword'>ccall</span> <span class='hs-str'>"&nettle_des_encrypt"</span> <span class='hs-varid'>p'nettle_des_encrypt</span>
<a name="line-55"></a> <span class='hs-keyglyph'>::</span> <span class='hs-conid'>FunPtr</span> <span class='hs-layout'>(</span><span class='hs-conid'>Ptr</span> <span class='hs-conid'>C'des_ctx</span> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>CUInt</span> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>Ptr</span> <span class='hs-conid'>CUChar</span> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>Ptr</span> <span class='hs-conid'>CUChar</span> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>IO</span> <span class='hs-conid'>()</span><span class='hs-layout'>)</span>
<a name="line-56"></a>
<a name="line-57"></a><span class='hs-comment'>{-# LINE 17 "Bindings/Nettle/Cipher/DES.hsc" #-}</span>
<a name="line-58"></a><span class='hs-keyword'>foreign</span> <span class='hs-keyword'>import</span> <span class='hs-keyword'>ccall</span> <span class='hs-str'>"nettle_des_decrypt"</span> <span class='hs-varid'>c'nettle_des_decrypt</span>
<a name="line-59"></a> <span class='hs-keyglyph'>::</span> <span class='hs-conid'>Ptr</span> <span class='hs-conid'>C'des_ctx</span> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>CUInt</span> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>Ptr</span> <span class='hs-conid'>CUChar</span> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>Ptr</span> <span class='hs-conid'>CUChar</span> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>IO</span> <span class='hs-conid'>()</span>
<a name="line-60"></a><span class='hs-keyword'>foreign</span> <span class='hs-keyword'>import</span> <span class='hs-keyword'>ccall</span> <span class='hs-str'>"&nettle_des_decrypt"</span> <span class='hs-varid'>p'nettle_des_decrypt</span>
<a name="line-61"></a> <span class='hs-keyglyph'>::</span> <span class='hs-conid'>FunPtr</span> <span class='hs-layout'>(</span><span class='hs-conid'>Ptr</span> <span class='hs-conid'>C'des_ctx</span> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>CUInt</span> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>Ptr</span> <span class='hs-conid'>CUChar</span> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>Ptr</span> <span class='hs-conid'>CUChar</span> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>IO</span> <span class='hs-conid'>()</span><span class='hs-layout'>)</span>
<a name="line-62"></a>
<a name="line-63"></a><span class='hs-comment'>{-# LINE 18 "Bindings/Nettle/Cipher/DES.hsc" #-}</span>
<a name="line-64"></a><span class='hs-keyword'>foreign</span> <span class='hs-keyword'>import</span> <span class='hs-keyword'>ccall</span> <span class='hs-str'>"nettle_des_check_parity"</span> <span class='hs-varid'>c'nettle_des_check_parity</span>
<a name="line-65"></a> <span class='hs-keyglyph'>::</span> <span class='hs-conid'>CUInt</span> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>Ptr</span> <span class='hs-conid'>CUChar</span> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>IO</span> <span class='hs-conid'>()</span>
<a name="line-66"></a><span class='hs-keyword'>foreign</span> <span class='hs-keyword'>import</span> <span class='hs-keyword'>ccall</span> <span class='hs-str'>"&nettle_des_check_parity"</span> <span class='hs-varid'>p'nettle_des_check_parity</span>
<a name="line-67"></a> <span class='hs-keyglyph'>::</span> <span class='hs-conid'>FunPtr</span> <span class='hs-layout'>(</span><span class='hs-conid'>CUInt</span> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>Ptr</span> <span class='hs-conid'>CUChar</span> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>IO</span> <span class='hs-conid'>()</span><span class='hs-layout'>)</span>
<a name="line-68"></a>
<a name="line-69"></a><span class='hs-comment'>{-# LINE 19 "Bindings/Nettle/Cipher/DES.hsc" #-}</span>
<a name="line-70"></a><span class='hs-keyword'>foreign</span> <span class='hs-keyword'>import</span> <span class='hs-keyword'>ccall</span> <span class='hs-str'>"nettle_des_fix_parity"</span> <span class='hs-varid'>c'nettle_des_fix_parity</span>
<a name="line-71"></a> <span class='hs-keyglyph'>::</span> <span class='hs-conid'>CUInt</span> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>Ptr</span> <span class='hs-conid'>CUChar</span> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>Ptr</span> <span class='hs-conid'>CUChar</span> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>IO</span> <span class='hs-conid'>()</span>
<a name="line-72"></a><span class='hs-keyword'>foreign</span> <span class='hs-keyword'>import</span> <span class='hs-keyword'>ccall</span> <span class='hs-str'>"&nettle_des_fix_parity"</span> <span class='hs-varid'>p'nettle_des_fix_parity</span>
<a name="line-73"></a> <span class='hs-keyglyph'>::</span> <span class='hs-conid'>FunPtr</span> <span class='hs-layout'>(</span><span class='hs-conid'>CUInt</span> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>Ptr</span> <span class='hs-conid'>CUChar</span> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>Ptr</span> <span class='hs-conid'>CUChar</span> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>IO</span> <span class='hs-conid'>()</span><span class='hs-layout'>)</span>
<a name="line-74"></a>
<a name="line-75"></a><span class='hs-comment'>{-# LINE 20 "Bindings/Nettle/Cipher/DES.hsc" #-}</span>
<a name="line-76"></a>
<a name="line-77"></a><a name="c'DES3_BLOCK_SIZE"></a><span class='hs-definition'>c'DES3_BLOCK_SIZE</span> <span class='hs-keyglyph'>=</span> <span class='hs-num'>8</span>
<a name="line-78"></a><span class='hs-definition'>c'DES3_BLOCK_SIZE</span> <span class='hs-keyglyph'>::</span> <span class='hs-layout'>(</span><span class='hs-conid'>Num</span> <span class='hs-varid'>a</span><span class='hs-layout'>)</span> <span class='hs-keyglyph'>=></span> <span class='hs-varid'>a</span>
<a name="line-79"></a>
<a name="line-80"></a><a name="c'DES3_KEY_SIZE"></a><span class='hs-comment'>{-# LINE 22 "Bindings/Nettle/Cipher/DES.hsc" #-}</span>
<a name="line-81"></a><span class='hs-definition'>c'DES3_KEY_SIZE</span> <span class='hs-keyglyph'>=</span> <span class='hs-num'>24</span>
<a name="line-82"></a><span class='hs-definition'>c'DES3_KEY_SIZE</span> <span class='hs-keyglyph'>::</span> <span class='hs-layout'>(</span><span class='hs-conid'>Num</span> <span class='hs-varid'>a</span><span class='hs-layout'>)</span> <span class='hs-keyglyph'>=></span> <span class='hs-varid'>a</span>
<a name="line-83"></a>
<a name="line-84"></a><span class='hs-comment'>{-# LINE 23 "Bindings/Nettle/Cipher/DES.hsc" #-}</span>
<a name="line-85"></a>
<a name="line-86"></a>
<a name="line-87"></a><a name="C'des3_ctx"></a><span class='hs-comment'>{-# LINE 25 "Bindings/Nettle/Cipher/DES.hsc" #-}</span>
<a name="line-88"></a><a name="C'des3_ctx"></a><span class='hs-keyword'>data</span> <span class='hs-conid'>C'des3_ctx</span> <span class='hs-keyglyph'>=</span> <span class='hs-conid'>C'des3_ctx</span><span class='hs-layout'>{</span>
<a name="line-89"></a><span class='hs-layout'>}</span> <span class='hs-keyword'>deriving</span> <span class='hs-layout'>(</span><span class='hs-conid'>Eq</span><span class='hs-layout'>,</span><span class='hs-conid'>Show</span><span class='hs-layout'>)</span>
<a name="line-90"></a><a name="instance%20Storable%20C'des3_ctx"></a><span class='hs-keyword'>instance</span> <span class='hs-conid'>Storable</span> <span class='hs-conid'>C'des3_ctx</span> <span class='hs-keyword'>where</span>
<a name="line-91"></a> <span class='hs-varid'>sizeOf</span> <span class='hs-keyword'>_</span> <span class='hs-keyglyph'>=</span> <span class='hs-num'>384</span>
<a name="line-92"></a> <span class='hs-varid'>alignment</span> <span class='hs-keyword'>_</span> <span class='hs-keyglyph'>=</span> <span class='hs-num'>4</span>
<a name="line-93"></a> <span class='hs-varid'>peek</span> <span class='hs-varid'>p</span> <span class='hs-keyglyph'>=</span> <span class='hs-keyword'>do</span>
<a name="line-94"></a> <span class='hs-varid'>return</span> <span class='hs-varop'>$</span> <span class='hs-conid'>C'des3_ctx</span>
<a name="line-95"></a> <span class='hs-varid'>poke</span> <span class='hs-varid'>p</span> <span class='hs-layout'>(</span><span class='hs-conid'>C'des3_ctx</span><span class='hs-layout'>)</span> <span class='hs-keyglyph'>=</span> <span class='hs-keyword'>do</span>
<a name="line-96"></a> <span class='hs-varid'>return</span> <span class='hs-conid'>()</span>
<a name="line-97"></a>
<a name="line-98"></a><span class='hs-comment'>{-# LINE 26 "Bindings/Nettle/Cipher/DES.hsc" #-}</span>
<a name="line-99"></a>
<a name="line-100"></a><span class='hs-keyword'>foreign</span> <span class='hs-keyword'>import</span> <span class='hs-keyword'>ccall</span> <span class='hs-str'>"nettle_des3_set_key"</span> <span class='hs-varid'>c'nettle_des3_set_key</span>
<a name="line-101"></a> <span class='hs-keyglyph'>::</span> <span class='hs-conid'>Ptr</span> <span class='hs-conid'>C'des3_ctx</span> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>Ptr</span> <span class='hs-conid'>CUChar</span> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>IO</span> <span class='hs-conid'>()</span>
<a name="line-102"></a><span class='hs-keyword'>foreign</span> <span class='hs-keyword'>import</span> <span class='hs-keyword'>ccall</span> <span class='hs-str'>"&nettle_des3_set_key"</span> <span class='hs-varid'>p'nettle_des3_set_key</span>
<a name="line-103"></a> <span class='hs-keyglyph'>::</span> <span class='hs-conid'>FunPtr</span> <span class='hs-layout'>(</span><span class='hs-conid'>Ptr</span> <span class='hs-conid'>C'des3_ctx</span> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>Ptr</span> <span class='hs-conid'>CUChar</span> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>IO</span> <span class='hs-conid'>()</span><span class='hs-layout'>)</span>
<a name="line-104"></a>
<a name="line-105"></a><span class='hs-comment'>{-# LINE 28 "Bindings/Nettle/Cipher/DES.hsc" #-}</span>
<a name="line-106"></a><span class='hs-keyword'>foreign</span> <span class='hs-keyword'>import</span> <span class='hs-keyword'>ccall</span> <span class='hs-str'>"nettle_des3_encrypt"</span> <span class='hs-varid'>c'nettle_des3_encrypt</span>
<a name="line-107"></a> <span class='hs-keyglyph'>::</span> <span class='hs-conid'>Ptr</span> <span class='hs-conid'>C'des3_ctx</span> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>CUInt</span> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>Ptr</span> <span class='hs-conid'>CUChar</span> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>Ptr</span> <span class='hs-conid'>CUChar</span> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>IO</span> <span class='hs-conid'>()</span>
<a name="line-108"></a><span class='hs-keyword'>foreign</span> <span class='hs-keyword'>import</span> <span class='hs-keyword'>ccall</span> <span class='hs-str'>"&nettle_des3_encrypt"</span> <span class='hs-varid'>p'nettle_des3_encrypt</span>
<a name="line-109"></a> <span class='hs-keyglyph'>::</span> <span class='hs-conid'>FunPtr</span> <span class='hs-layout'>(</span><span class='hs-conid'>Ptr</span> <span class='hs-conid'>C'des3_ctx</span> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>CUInt</span> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>Ptr</span> <span class='hs-conid'>CUChar</span> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>Ptr</span> <span class='hs-conid'>CUChar</span> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>IO</span> <span class='hs-conid'>()</span><span class='hs-layout'>)</span>
<a name="line-110"></a>
<a name="line-111"></a><span class='hs-comment'>{-# LINE 29 "Bindings/Nettle/Cipher/DES.hsc" #-}</span>
<a name="line-112"></a><span class='hs-keyword'>foreign</span> <span class='hs-keyword'>import</span> <span class='hs-keyword'>ccall</span> <span class='hs-str'>"nettle_des3_decrypt"</span> <span class='hs-varid'>c'nettle_des3_decrypt</span>
<a name="line-113"></a> <span class='hs-keyglyph'>::</span> <span class='hs-conid'>Ptr</span> <span class='hs-conid'>C'des3_ctx</span> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>CUInt</span> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>Ptr</span> <span class='hs-conid'>CUChar</span> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>Ptr</span> <span class='hs-conid'>CUChar</span> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>IO</span> <span class='hs-conid'>()</span>
<a name="line-114"></a><span class='hs-keyword'>foreign</span> <span class='hs-keyword'>import</span> <span class='hs-keyword'>ccall</span> <span class='hs-str'>"&nettle_des3_decrypt"</span> <span class='hs-varid'>p'nettle_des3_decrypt</span>
<a name="line-115"></a> <span class='hs-keyglyph'>::</span> <span class='hs-conid'>FunPtr</span> <span class='hs-layout'>(</span><span class='hs-conid'>Ptr</span> <span class='hs-conid'>C'des3_ctx</span> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>CUInt</span> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>Ptr</span> <span class='hs-conid'>CUChar</span> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>Ptr</span> <span class='hs-conid'>CUChar</span> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>IO</span> <span class='hs-conid'>()</span><span class='hs-layout'>)</span>
<a name="line-116"></a>
<a name="line-117"></a><span class='hs-comment'>{-# LINE 30 "Bindings/Nettle/Cipher/DES.hsc" #-}</span>
<a name="line-118"></a>
</pre></body>
</html>
|