# pbkdfBitsFromHash function

int pbkdfBitsFromHash(

1. ScramHashType type

)

## Implementation

    int pbkdfBitsFromHash(ScramHashType type) {
      switch (type) {
        // NOTE: SHA1 is 20 octets long => 20 octets * 8 bits/octet
        case ScramHashType.sha1:
          return 160;
        // NOTE: SHA256 is 32 octets long => 32 octets * 8 bits/octet
        case ScramHashType.sha256:
          return 256;
        // NOTE: SHA512 is 64 octets long => 64 octets * 8 bits/octet
        case ScramHashType.sha512:
          return 512;
      }
    }