Brightsign Object Reference Manual (FW 5.1) Instrukcja Użytkownika Strona 148

  • Pobierz
  • Dodaj do moich podręczników
  • Drukuj
  • Strona
    / 341
  • Spis treści
  • BOOKMARKI
  • Oceniono. / 5. Na podstawie oceny klientów
Przeglądanie stron 147
140
roPassKey
This object provides a means for generating keys (hashes) from a password and salt.
Object Creation: The object is passed an associative array that specifies the generation methods and cipher.
CreateObject("roPassKey", parameters As roAssociativeArray)
The associative array should contain the following parameters:
method: The key derivation method. Currently, only "pbkdf2" can be specified.
kefn: The pseudorandom function (PRF). Currently, only "hmac-sha256" can be specified.
keylen: The key length
iterations: The number of iterations
Interfaces: ifPassKey
The ifPassKey interface provides the following:
GenerateKey(password As Object, salt As Object) As roByteArray: Generates a key using the
supplied password and salt. The parameters may be passed as either strings or roByteArray instances. The
generated roByteArray instance may contain all possible byte values, including NUL.
GenerateSalt(length As Integer) As roByteArray: Generates a salt of the specified length. This salt
can be used when calling the GenerateKey() method. The generated roByteArray instance may contain all
possible byte values, including NUL.
Example:
' Create input test data
salt = CreateObject("roByteArray")
Przeglądanie stron 147
1 2 ... 143 144 145 146 147 148 149 150 151 152 153 ... 340 341

Komentarze do niniejszej Instrukcji

Brak uwag