cryptix.pgp
Class DashProtected

java.lang.Object
  |
  +--cryptix.pgp.DashProtected

public abstract class DashProtected
extends java.lang.Object

This class enables the encoding and decoding of the "- " protection which will protect a String against some forms of corruption during email transport. Note that this class expects all line breaks to be represented (both before and after) as CRLFs.


Copyright © 1995-1997 Systemics Ltd on behalf of the Cryptix Development Team.
All rights reserved.

$Revision: 1.1.1.1 $

Since:
Cryptix 2.2 or earlier
Author:
Jill Baker

Constructor Summary
DashProtected()
           
 
Method Summary
static java.lang.String decode(java.lang.String s)
          Remove all "- "s from the start of lines.
static java.lang.String encode(java.lang.String s)
          Prefix all vulnerable lines with "- ".
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DashProtected

public DashProtected()
Method Detail

encode

public static java.lang.String encode(java.lang.String s)
Prefix all vulnerable lines with "- ".
Parameters:
s - text to be encoded
Returns:
dash-proteced text

decode

public static java.lang.String decode(java.lang.String s)
Remove all "- "s from the start of lines.
Parameters:
s - dash-proteced text to be decoded
Returns:
text with dash-protection removed