Last update December 10, 2004

Signed Source Code /
Signed Embedded HTML



Difference (previous author) (Change, Edit, normal page display)

Changed: 1c1,100
Describe the new page here.
= Embedded Signatur for HTML source files =

see also SignedSourceCode

WARNING: this is against the W3C standard but will be rendered correctly all browsers

== 1/5 The Source ==

Verify that your source file is functional.

[[code]<pre>
&lt;html&gt;
&nbsp;&nbsp;&nbsp; &lt;head&gt;&lt;title&gt;The Title&lt;/title&gt;&lt;/head&gt;
&nbsp;&nbsp;&nbsp; &lt;body&gt;&lt;CODE&gt;
int main(char[][] arg){
&nbsp;&nbsp;&nbsp; printf("Hello!\n");
&nbsp;&nbsp;&nbsp; return 0;
}
&nbsp;&nbsp;&nbsp; &lt;/CODE&gt;&lt;/body&gt;
&lt;/html&gt;</pre>]

== 2/5 Preparation ==

Replace "&lt;html&gt;" and "&lt;/html&gt;" with "--&gt;" and "&lt;!--"

[[code]<pre>--&gt;
&nbsp;&nbsp;&nbsp; &lt;head&gt;&lt;title&gt;The Title&lt;/title&gt;&lt;/head&gt;
&nbsp;&nbsp;&nbsp; &lt;body&gt;&lt;CODE&gt;
int main(char[][] arg){
&nbsp;&nbsp;&nbsp; printf("Hello!\n");
&nbsp;&nbsp;&nbsp; return 0;
}
&nbsp;&nbsp;&nbsp; &lt;/CODE&gt;&lt;/body&gt;
&lt;!--</pre>]

== 3/5 Create Signature ==

gpg --out output --clearsign input

or

gpg --clearsign < input > output

[[code]<pre>-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

-->
<head><title>TheTitle?</title></head>
<body><CODE>
int main(char[][] arg){
printf("Hello!\n");
return 0;
}
</CODE></body>
<!--
-----BEGIN PGP SIGNATURE-----
Version: GnuPG? v1.2.6 (GNU/Linux)

iD8DBQFBuOg13w+/yD4P9tIRAji0AJ9lQci7yH/Oy7TExjqhXT4kSEXNOgCgvyRz?
hdQlIn8Il9543HjqQwpRn5g=
=1I7u
-----END PGP SIGNATURE-----
</pre>]

== 4/5 Cleanup ==

Add the missing "<html><!--", and "--></html>".

[[code]<pre>
<html><!--
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

-->
<head><title>TheTitle?</title></head>
<body><CODE>
int main(char[][] arg){
printf("Hello!\n");
return 0;
}
</CODE></body>
<!--
-----BEGIN PGP SIGNATURE-----
Version: GnuPG? v1.2.6 (GNU/Linux)

iD8DBQFBuOg13w+/yD4P9tIRAji0AJ9lQci7yH/Oy7TExjqhXT4kSEXNOgCgvyRz?
hdQlIn8Il9543HjqQwpRn5g=
=1I7u
-----END PGP SIGNATURE-----
--></html>
</pre>]

== 5/5 Verify the Signature ==

gpg input

or

gpg < input


Embedded Signatur for HTML source files

see also SignedSourceCode

WARNING: this is against the W3C standard but will be rendered correctly all browsers

1/5 The Source

Verify that your source file is functional.

&lt;html&gt;
&nbsp;&nbsp;&nbsp; &lt;head&gt;&lt;title&gt;The Title&lt;/title&gt;&lt;/head&gt;
&nbsp;&nbsp;&nbsp; &lt;body&gt;&lt;CODE&gt;
int main(char[][] arg){
&nbsp;&nbsp;&nbsp; printf("Hello!\n");
&nbsp;&nbsp;&nbsp; return 0;
}
&nbsp;&nbsp;&nbsp; &lt;/CODE&gt;&lt;/body&gt;
&lt;/html&gt;

2/5 Preparation

Replace "&lt;html&gt;" and "&lt;/html&gt;" with "--&gt;" and "&lt;!--"

--&gt;
&nbsp;&nbsp;&nbsp; &lt;head&gt;&lt;title&gt;The Title&lt;/title&gt;&lt;/head&gt;
&nbsp;&nbsp;&nbsp; &lt;body&gt;&lt;CODE&gt;
int main(char[][] arg){
&nbsp;&nbsp;&nbsp; printf("Hello!\n");
&nbsp;&nbsp;&nbsp; return 0;
}
&nbsp;&nbsp;&nbsp; &lt;/CODE&gt;&lt;/body&gt;
&lt;!--

3/5 Create Signature

gpg --out output --clearsign input

or

gpg --clearsign < input > output

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

 -->
    <head><title>TheTitle</title></head>
    <body><CODE>
int main(char[][] arg){
    printf("Hello!\n");
    return 0;
}
    </CODE></body>
<!--
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.6 (GNU/Linux)

iD8DBQFBuOg13w+/yD4P9tIRAji0AJ9lQci7yH/Oy7TExjqhXT4kSEXNOgCgvyRz
hdQlIn8Il9543HjqQwpRn5g=
=1I7u
-----END PGP SIGNATURE-----

4/5 Cleanup

Add the missing "<html><!--", and "--></html>".

<html><!--
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

 -->
    <head><title>TheTitle</title></head>
    <body><CODE>
int main(char[][] arg){
    printf("Hello!\n");
    return 0;
}
    </CODE></body>
<!--
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.6 (GNU/Linux)

iD8DBQFBuOg13w+/yD4P9tIRAji0AJ9lQci7yH/Oy7TExjqhXT4kSEXNOgCgvyRz
hdQlIn8Il9543HjqQwpRn5g=
=1I7u
-----END PGP SIGNATURE-----
--></html>

5/5 Verify the Signature

gpg input

or

gpg < input


FrontPage | News | TestPage | MessageBoard | Search | Contributors | Folders | Index | Help | Preferences | Edit

Edit text of this page (date of last change: December 10, 2004 7:56 (diff))