Help for this page

Select Code to Download


  1. or download this
    sub get_magic_token {
        my $self=shift;
        my $token=LocalSites::Crypt::encrypt_string(join '|',$self->id(), 
    +$self->username(), $self->password());
        return $token;
    }
    
  2. or download this
    sub encrypt_string {
        my $clear_string=shift;
    ...
        my $crypt_string=$cipher->encrypt_hex( $clear_string );
        return $crypt_string;
    }
    
  3. or download this
    sub decode_magic_token {
        my $self=shift;
    ...
        my ($id,$username,$password)=split /\|/, $decrypted;
        return $id;
    }
    
  4. or download this
    sub decrypt_string {
        my $crypt_string=shift;
    ...
        my $clear_string=$cipher->decrypt_hex( $crypt_string );
        return $clear_string;
    }
    
  5. or download this
    sub decode_magic_token {
        my $self=shift;
    ...
            return $id;
        }
    }