- 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;
}
- or download this
sub encrypt_string {
my $clear_string=shift;
...
my $crypt_string=$cipher->encrypt_hex( $clear_string );
return $crypt_string;
}
- or download this
sub decode_magic_token {
my $self=shift;
...
my ($id,$username,$password)=split /\|/, $decrypted;
return $id;
}
- or download this
sub decrypt_string {
my $crypt_string=shift;
...
my $clear_string=$cipher->decrypt_hex( $crypt_string );
return $clear_string;
}
- or download this
sub decode_magic_token {
my $self=shift;
...
return $id;
}
}