Kablow!

Validation, authentication and file handling

플레이하며 배우기

이 문제들을 풀어 에너지를 얻은 뒤 낚시하고 탐험하세요. 계정이 필요 없어요.

교육자를 위해: Validation, authentication and file handling(Computer Science, Programming)을(를) 위한 바로 쓸 수 있는 수업 슬라이드, 복습 노트 — 수업에 사용하거나, 학습자들이 실시간 게임으로 즐기는 인터랙티브 클래스 활동으로 진행하세요.

수업 노트

Validation

  • Validation checks that data entered is reasonable and sensible, but not necessarily correct. Types:
  • Range check: within limits (age 0-120). Length check: number of characters (password at least 8). Type check: correct data type (integer). Presence check: something has been entered. Format check: pattern (postcode). Lookup check: value is in a list.
  • Verification checks data was entered correctly: double entry (type twice) or visual check.

Validation checks

Validation checks

Authentication

  • Authentication checks evidence of a claimed identity, such as a password or fingerprint. Two-factor authentication combines different factor categories, for example a password and possession of a security key.
  • CAPTCHA checks whether activity is likely human rather than automated; it is not proof of identity.
  • Use long unique passwords or passphrases. Systems should store suitably salted password hashes rather than plaintext passwords.

Different authentication factors

Different authentication factorsCategoryExampleEvidenceSomething youknowPasswordKnowledge of a secretSomething youhaveSecuritykeyPossession of a deviceSomething you areFingerprintBiometriccharacteristic

Defensive design

  • Anticipate invalid input and misuse: validate against rules, handle errors, avoid hard-coded passwords and use meaningful names.
  • Sanitise or encode content appropriately for its destination. Use parameterised database queries; deleting suspicious characters is not a complete SQL-injection defence.

File handling

  • Programs can read from and write to text files so data persists after the program closes.
  • Steps: open the file (read, write or append), read/write data, close the file.
  • Example: file = OPEN("scores.txt") line = file.READLINE() file.CLOSE().

File-handling lifecycle

File-handling lifecycle

Why use files?

  • Store results, load configuration, and keep records.

슬라이드

Sign up free to view the lesson slides

Step through every slide for this topic — plus flashcards and revision notes — with a free account.

연습 문제

무료 미리 보기 — 33개 중 8개 문제. 가입하면 전부 볼 수 있어요.
  1. 1.What is validation?

    Easy
    • Achecking input is sensible and acceptable
    • Bchecking input is correct
    • Cdeleting input
    • Dencrypting input
  2. 2.What is authentication?

    Easy
    • Achecking a user's identity
    • Bchecking data type
    • Cchecking range
    • Dchecking length
  3. 3.What does a length check do?

    Easy
    • Achecks the number of characters
    • Bchecks the type
    • Cchecks a list
    • Dchecks a range
  4. 4.What does a type check do?

    Easy
    • Achecks data is the correct data type
    • Bchecks the length
    • Cchecks the format
    • Dchecks the range
  5. 5.What does a lookup check do?

    Easy
    • Achecks the value is in a list
    • Bchecks the length
    • Cchecks the range
    • Dchecks the presence
  6. 6.Which check would validate a postcode pattern?

    Easy
    • Aformat check
    • Brange check
    • Ctype check
    • Dpresence check
  7. 7.What is verification?

    Easy
    • Achecking data was entered correctly
    • Bchecking it is sensible
    • Cchecking identity
    • Dencrypting
  8. 8.What is double entry?

    Easy
    • Atyping data twice to check it matches
    • Btyping it once
    • Ccopying it
    • Ddeleting it

Unlock all 33 questions & more

무료 계정을 만들어 이 주제의 모든 문제, 슬라이드, 플래시카드, 복습 노트를 확인하세요.

기출 문제

이 주제의 기출 문제 연습이 곧 나와요.
곧 출시