Method: Ppp::Generator#passcodes

Defined in:
lib/ppp/generator.rb

#passcodes(offset, count) ⇒ Array

Creates passcodes seeded off the SHA-256 key this object was created with.

Calling this method subsequent times with the same offset will return the
same passcodes, so you should increase the offset by count each time.

Parameters:

  • offset (Fixnum)

    the number of passcodes to skip

  • count (Fixnum)

    the number of passcodes to return

Returns:

  • (Array)

    an array of passcodes



33
34
35
# File 'lib/ppp/generator.rb', line 33

def passcodes offset, count
  Cppp.passcodes @seed, offset, count, @length, @alphabet
end