Ragnarok: Documentation


Note this documentation comes from the POD.

Ragnarok(3)        User Contributed Perl Documentation       Ragnarok(3)

NAME
     Ragnarok.pm - The Ragnarok Encryption Module

DESCRIPTION
     The Ragnarok Prevention Module is a part of the ANUBIS Package.
     It contains the encryption algorithm for the ANUBIS API.

ARGUMENTS
     The Ragnarok Prevention Module accepts the following arguments:

    v
    version [-v gives just the version number.]
    returnusername
    username=
    password=
    aboutkey=
    aboutcode=
        Note: AboutKey or Key must be defined

    generate=
        Note: key and code must be defined unless you are generating the key
        or code. If generating the key, aboutkey must be set. If generating
        the code aboutkey or key must be set. If generating the IRCode, it is
        only valid for today and tomorrow.

             The possible values for the generate argument are:
             * key
             * code 
             * proof
             * installcode
             * removalcode

    ircode=
    key=
    code=
    proof=
    validator

ERROR CODES
    The Ragnarok Prevention Module contains the following error codes:

    -5 This error, also known as E_CODE_NOT_DEFINED, comes about if $Code or
    $AboutCode are not set.
    -4  This error, also known as E_KEY_NOT_DEFINED, comes about if $Key or
        $AboutKey are not set.

    -3  This error, also known as E_NOTHING_TO_GENERATE, comes about when an
        invalid option is passed to generate and it does not generate
        anything.

    -2  This error, also known as E_INVALID_IRCODE, comes about in the
        properties algorithm if the supplied IRCode is invalid.

    -1  This error, also known as E_INVALID_PROPERTY, comes about if the first
        argument to property is not a non-negative integer.

SYNOPSIS
     use Ragnarok;
 
     my $r = new Ragnarok();

     # Always define the key before defining the code.
     # You can't type in the code on the keypad if you can't
     # get through the door :) Also, Ragnarok returns an error if you try.
 
     $r->properties(ABOUTKEY, $aboutKey);
     $r->properties(KEY, $r->generate(ABOUTKEY));
     $r->properties(ABOUTCODE, $aboutCode);
     $r->properties(CODE, $r->generate(ABOUTCODE));


     my $proof = $r->generate(PROOF);
     $r->properties(PROOF, $proof);
 
     if ($r->properties(IRCODE, $installcode) == E_INVALID_IRCODE) {
        die "Sorry, invalid install code.";
     } else {
        # VALID INSTALL CODE
     }
 
     if ($r->properties(IRCODE, $removalcode) == E_INVALID_IRCODE) {
        die "Sorry, invalid removal code.";
     } else {
        # VALID REMOVAL CODE
     }

FUNCTION DOCUMENTATION
  new
     new is the constructor for the object oriented implementation
     of Ragnarok. It takes no arguments.

  properties
     properties is an api function that allows the setting of
     different properties and the recalling of those properties.
     To set a property, give properties two arguments, the enum
     value and the value to set.  To recall a value, give the
     subroutine one argument, the enum value.  The valid
     property types (a.k.a. enum values) are the following:

         * KEY
         * CODE
         * PROOF
         * IRCODE
         * ABOUTKEY
         * ABOUTCODE
  generate
     generate is an api function that accepts one argument,
     a number representing what to generate.  Options are
     from following list of enumerated options (Note: some
     options have synonyms):

         * GENERATE_KEY or KEY
         * GENERATE_CODE or CODE
         * GENERATE_PROOF or PROOF
         * GENERATE_INSTALL_CODE or INSTALLCODE
         * GENERATE_REMOVAL_CODE or REMOVALCODE
         * GENERATEUPASS

COPYRIGHT
     Copyright 2012 Z. Bornheimer.
 
     Permission is granted to copy, distribute and/or modify this 
     documentation under the terms of the GNU Free Documentation 
     License, Version 1.3 or any later version published by the 
     Free Software Foundation; with no Invariant Sections, with 
     no Front-Cover Texts, and with no Back-Cover Texts.
 
     Ragnarok itself is free software: you can redistribute it
     and/or modify it under the terms of the GNU Lesser General
     Public License as published by the Free Software Foundation, 
     either version 3 of the License, or any later version.
 
     This program is distributed in the hope that it will be useful,
     but WITHOUT ANY WARRANTY; without even the implied warranty of
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     GNU Lesser General Public License for more details.



perl v5.16.3                      2014‐03‐10                    Ragnarok(3)


Comments

Topic revision: r1 - 2014-12-14 - ZachBornheimer
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2021 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback