Skip to content

Example code in cSecureOneTimePassword.pkg does not match current classes implementation/methods #1

@sampizarro

Description

@sampizarro
// Example:
//
//    Object oOneTimePassword is a cTimeBasedOneTimePassword
//        Set piDigitCount to 6
//    End_Object
//
//    Function GetTOTP Returns String
//        Integer iOtp
//        Get TOTP of oOneTimePassword "12345678901234567890" to iOtp
//    End_Function
//
//    Function RandomBase32Secret Returns String
//        Integer iHashImpl
//        Integer iLen
//        String  sSecret
//        UChar[] ucaSecret
//
//        Get piHashImplementation of oOneTimePassword to iHashImpl
//        Get MinimumKeyBytes of ghoSecurity iHashImpl to iLen
//        Get RandomData of ghoSecurity iLen to ucaSecret
//        Move (Bin2Base32(ghoSecurity, ucaSecret)) to sSecret
//
//        Function_Return sSecret
//    End_Function

there isn't a TOPT method defined on base classes.

Also the new class structure suggest we need to use cSecureOneTimePassword class instead, and there is no sample for that.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions