Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
amiyatulu committed Sep 6, 2024
1 parent 6db8ff0 commit 629be97
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 2 deletions.
2 changes: 1 addition & 1 deletion book/print.html
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ <h2 id="the-storage-map-api"><a class="header" href="#the-storage-map-api">The S
*entry_option = Some(entry);
});</code></pre>
<h2 id="quiz-1"><a class="header" href="#quiz-1">Quiz</a></h2>
<div class="quiz-placeholder" data-quiz-name="storage_maps" data-quiz-questions="{&quot;questions&quot;:[{&quot;id&quot;:&quot;ec184e84-52ef-4b2c-a9cf-4a79cab76531&quot;,&quot;type&quot;:&quot;MultipleChoice&quot;,&quot;answer&quot;:{&quot;answer&quot;:&quot;Blake2_128Concat&quot;},&quot;prompt&quot;:{&quot;distractors&quot;:[&quot;Twox64Concat&quot;,&quot;Both are equally secure&quot;,&quot;It depends on the specific use case&quot;],&quot;prompt&quot;:&quot;Which hasher is more secure to use, Blake2_128Concat or Twox64Concat?\n&quot;}},{&quot;id&quot;:&quot;d0060eeb-396f-4896-ac6a-a9c140f112ee&quot;,&quot;type&quot;:&quot;MultipleChoice&quot;,&quot;answer&quot;:{&quot;answer&quot;:&quot;It is more efficient&quot;},&quot;prompt&quot;:{&quot;distractors&quot;:[&quot;It is more secure&quot;,&quot;It is compatible with more data types&quot;,&quot;It is easier to implement&quot;],&quot;prompt&quot;:&quot;What is the main advantage of using the Twox64Concat hasher?\n&quot;}}]}" ></div>
<div class="quiz-placeholder" data-quiz-name="storage_maps" data-quiz-questions="{&quot;questions&quot;:[{&quot;id&quot;:&quot;ec184e84-52ef-4b2c-a9cf-4a79cab76531&quot;,&quot;type&quot;:&quot;MultipleChoice&quot;,&quot;answer&quot;:{&quot;answer&quot;:&quot;Blake2_128Concat&quot;},&quot;prompt&quot;:{&quot;distractors&quot;:[&quot;Twox64Concat&quot;,&quot;Both are equally secure&quot;,&quot;It depends on the specific use case&quot;],&quot;prompt&quot;:&quot;Which hasher is more secure to use, Blake2_128Concat or Twox64Concat?\n&quot;}},{&quot;id&quot;:&quot;d0060eeb-396f-4896-ac6a-a9c140f112ee&quot;,&quot;type&quot;:&quot;MultipleChoice&quot;,&quot;answer&quot;:{&quot;answer&quot;:&quot;It is more efficient&quot;},&quot;prompt&quot;:{&quot;distractors&quot;:[&quot;It is more secure&quot;,&quot;It is compatible with more data types&quot;,&quot;It is easier to implement&quot;],&quot;prompt&quot;:&quot;What is the main advantage of using the Twox64Concat hasher?\n&quot;}},{&quot;id&quot;:&quot;e8352c31-5274-4a71-9e99-5f37fed4cc17&quot;,&quot;type&quot;:&quot;MultipleChoice&quot;,&quot;answer&quot;:{&quot;answer&quot;:&quot;When users cannot manipulate the storage map keys.&quot;},&quot;prompt&quot;:{&quot;distractors&quot;:[&quot;When users have the ability to generate and control storage map keys.&quot;,&quot;When the storage map values are randomly generated by the system, and user control the keys.&quot;,&quot;When users have the ability to generate and control their own account IDs.&quot;],&quot;prompt&quot;:&quot;In which of the following scenarios is it considered safe to use the Twox64Concat hasher?\n&quot;}}]}" ></div>
<script type="text/javascript" src="quiz/quiz-embed.iife.js"></script><link rel="stylesheet" type="text/css" href="quiz/style.css">
</main>

Expand Down
2 changes: 1 addition & 1 deletion book/storage_maps.html
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ <h2 id="the-storage-map-api"><a class="header" href="#the-storage-map-api">The S
*entry_option = Some(entry);
});</code></pre>
<h2 id="quiz"><a class="header" href="#quiz">Quiz</a></h2>
<div class="quiz-placeholder" data-quiz-name="storage_maps" data-quiz-questions="{&quot;questions&quot;:[{&quot;id&quot;:&quot;ec184e84-52ef-4b2c-a9cf-4a79cab76531&quot;,&quot;type&quot;:&quot;MultipleChoice&quot;,&quot;answer&quot;:{&quot;answer&quot;:&quot;Blake2_128Concat&quot;},&quot;prompt&quot;:{&quot;distractors&quot;:[&quot;Twox64Concat&quot;,&quot;Both are equally secure&quot;,&quot;It depends on the specific use case&quot;],&quot;prompt&quot;:&quot;Which hasher is more secure to use, Blake2_128Concat or Twox64Concat?\n&quot;}},{&quot;id&quot;:&quot;d0060eeb-396f-4896-ac6a-a9c140f112ee&quot;,&quot;type&quot;:&quot;MultipleChoice&quot;,&quot;answer&quot;:{&quot;answer&quot;:&quot;It is more efficient&quot;},&quot;prompt&quot;:{&quot;distractors&quot;:[&quot;It is more secure&quot;,&quot;It is compatible with more data types&quot;,&quot;It is easier to implement&quot;],&quot;prompt&quot;:&quot;What is the main advantage of using the Twox64Concat hasher?\n&quot;}}]}" ></div>
<div class="quiz-placeholder" data-quiz-name="storage_maps" data-quiz-questions="{&quot;questions&quot;:[{&quot;id&quot;:&quot;ec184e84-52ef-4b2c-a9cf-4a79cab76531&quot;,&quot;type&quot;:&quot;MultipleChoice&quot;,&quot;answer&quot;:{&quot;answer&quot;:&quot;Blake2_128Concat&quot;},&quot;prompt&quot;:{&quot;distractors&quot;:[&quot;Twox64Concat&quot;,&quot;Both are equally secure&quot;,&quot;It depends on the specific use case&quot;],&quot;prompt&quot;:&quot;Which hasher is more secure to use, Blake2_128Concat or Twox64Concat?\n&quot;}},{&quot;id&quot;:&quot;d0060eeb-396f-4896-ac6a-a9c140f112ee&quot;,&quot;type&quot;:&quot;MultipleChoice&quot;,&quot;answer&quot;:{&quot;answer&quot;:&quot;It is more efficient&quot;},&quot;prompt&quot;:{&quot;distractors&quot;:[&quot;It is more secure&quot;,&quot;It is compatible with more data types&quot;,&quot;It is easier to implement&quot;],&quot;prompt&quot;:&quot;What is the main advantage of using the Twox64Concat hasher?\n&quot;}},{&quot;id&quot;:&quot;e8352c31-5274-4a71-9e99-5f37fed4cc17&quot;,&quot;type&quot;:&quot;MultipleChoice&quot;,&quot;answer&quot;:{&quot;answer&quot;:&quot;When users cannot manipulate the storage map keys.&quot;},&quot;prompt&quot;:{&quot;distractors&quot;:[&quot;When users have the ability to generate and control storage map keys.&quot;,&quot;When the storage map values are randomly generated by the system, and user control the keys.&quot;,&quot;When users have the ability to generate and control their own account IDs.&quot;],&quot;prompt&quot;:&quot;In which of the following scenarios is it considered safe to use the Twox64Concat hasher?\n&quot;}}]}" ></div>
<script type="text/javascript" src="quiz/quiz-embed.iife.js"></script><link rel="stylesheet" type="text/css" href="quiz/style.css">
</main>

Expand Down
13 changes: 13 additions & 0 deletions book/storage_maps.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,16 @@ prompt.distractors = [
]
answer.answer = "It is more efficient"
id = "d0060eeb-396f-4896-ac6a-a9c140f112ee"

[[questions]]
type = "MultipleChoice"
prompt.prompt = """
In which of the following scenarios is it considered safe to use the Twox64Concat hasher?
"""
prompt.distractors = [
"When users have the ability to generate and control storage map keys.",
"When the storage map values are randomly generated by the system, and user control the keys.",
"When users have the ability to generate and control their own account IDs.",
]
answer.answer = "When users cannot manipulate the storage map keys."
id = "e8352c31-5274-4a71-9e99-5f37fed4cc17"
13 changes: 13 additions & 0 deletions src/storage_maps.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,16 @@ prompt.distractors = [
]
answer.answer = "It is more efficient"
id = "d0060eeb-396f-4896-ac6a-a9c140f112ee"

[[questions]]
type = "MultipleChoice"
prompt.prompt = """
In which of the following scenarios is it considered safe to use the Twox64Concat hasher?
"""
prompt.distractors = [
"When users have the ability to generate and control storage map keys.",
"When the storage map values are randomly generated by the system, and user control the keys.",
"When users have the ability to generate and control their own account IDs.",
]
answer.answer = "When users cannot manipulate the storage map keys."
id = "e8352c31-5274-4a71-9e99-5f37fed4cc17"

0 comments on commit 629be97

Please sign in to comment.