Last update December 10, 2004

Signed Source Code /
Signed Embedded HTML



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.

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

2/5 Preparation

Replace "<html>" and "</html>" with "-->" and "<!--"

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

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))