GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  OPENXPKI::CRYPTO::SECRET::PLAIN (3)

.ds Aq ’

Name

OpenXPKI::Crypto::Secret::Plain - Simple PIN concatenation

CONTENTS

Description

Simple PIN container that supports secret splitting by dividing the PIN in n components that are simply concatenated.

Usage example: simple one-part pin (not very useful)



  my $secret = OpenXPKI::Crypto::Secret->new();   # Plain pin, one part

  $secret->is_complete()               # returns undef
  my $result = $secret->get_secret();  # undef

  $secret->set_secret(foobar);

  $secret->is_complete()               # returns true
  $result = $secret->get_secret();     # foobar



Usage example: simple multi-part pin



  my $secret = OpenXPKI::Crypto::Secret->new(
      {
          TYPE => Plain,
          PARTS => 3,
      });   # Plain pin, three part

  my $result = $secret->get_secret();  # undef

  $secret->set_secret(
      {
          PART => 1,
          SECRET => foo,
      });
  $secret->set_secret(
      {
          PART => 3,
          SECRET => baz,
      });

  $secret->is_complete();           # returns undef
  $result = $secret->get_secret();  # still undef

  $secret->set_secret(
      {
          PART => 2,
          SECRET => bar,
      });

  $secret->is_complete();              # returns true
  $result = $secret->get_secret();     # foobarbaz



    Methods

new

Constructor. If a hash reference is given the following named parameters are accepted:
o TYPE

Must be ’Plain’

o PARTS

Integer, defaults to 1. Specifies the total number of secret parts.

is_complete

Returns true once all secret componentents are available.

get_secret

Returns the complete secret or undef if not yet available.

set_secret

Sets (part of) the secret.

Search for    or go to Top of page |  Section 3 |  Main Index


perl v5.20.3 OPENXPKI::CRYPTO::SECRET::PLAIN (3) 2016-04-03

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.