2003-05-04 Marcus Brinkmann <marcus@g10code.de>
[gpgme.git] / complus / vbtest.html
1 <html>
2 <head><title>g10 code - GPGCOM test</title>
3
4 <object id="gpg"
5         classid="CLSID:3811fd40-7f72-11d5-8c9e-0080ad190cd5">
6 </object>
7
8 <script language="VBScript">
9 Sub encrypt_text
10      On error resume next
11      Dim TheForm, plain
12
13      set TheForm = Document.forms ("MyForm")
14      gpg.armor = True
15      gpg.plaintext = TheForm.clear.value
16      gpg.ClearRecipients
17      gpg.AddRecipient TheForm.recp.value
18      Err.Clear
19      gpg.Encrypt
20      if Err <> 0 then
21          TheForm.encoded.value = "Error: " & CStr(Err.Number)
22      else
23          TheForm.encoded.value = gpg.ciphertext
24      end if
25 end sub
26 </script>
27 </head>
28 <body>
29 <h1>Silly Gpgcom test page</h1>
30
31 <form id="MyForm">
32 <textarea name="clear" rows = 3 cols=40>Please enter the text here</textarea>
33 <p>
34 Encrypt for <input name="recp" value="alice">
35 <input type="button" name="MyAction" value="Encrypt" 
36        language="VBScript" onclick="encrypt_text()">
37 <p>
38 <textarea name="encoded" rows=10 cols=75></textarea>
39 </form>
40
41 <p>
42
43 </body>
44 </html>     
45
46
47