aboutsummaryrefslogtreecommitdiff
path: root/files/ko/web/api/crypto_property
diff options
context:
space:
mode:
authorMDN <actions@users.noreply.github.com>2021-10-02 00:48:46 +0000
committerMDN <actions@users.noreply.github.com>2021-10-02 00:48:46 +0000
commit589e24fc829e1a5ff9827985f453720a4a6c804e (patch)
tree6c288a0033eb6e20b75a082a92839f1ce4c695db /files/ko/web/api/crypto_property
parente37aebdf4ed894fbf9f917ccb5b4b4d0ddbdfb32 (diff)
downloadtranslated-content-589e24fc829e1a5ff9827985f453720a4a6c804e.tar.gz
translated-content-589e24fc829e1a5ff9827985f453720a4a6c804e.tar.bz2
translated-content-589e24fc829e1a5ff9827985f453720a4a6c804e.zip
[CRON] sync translated content
Diffstat (limited to 'files/ko/web/api/crypto_property')
-rw-r--r--files/ko/web/api/crypto_property/index.html76
1 files changed, 76 insertions, 0 deletions
diff --git a/files/ko/web/api/crypto_property/index.html b/files/ko/web/api/crypto_property/index.html
new file mode 100644
index 0000000000..be31ca5888
--- /dev/null
+++ b/files/ko/web/api/crypto_property/index.html
@@ -0,0 +1,76 @@
+---
+title: Window.crypto
+slug: Web/API/crypto_property
+tags:
+ - API
+ - HTML DOM
+ - Property
+ - Reference
+ - Window
+translation_of: Web/API/Window/crypto
+original_slug: Web/API/Window/crypto
+---
+<div>{{APIRef}}</div>
+
+<p><span class="seoSummary"><strong><code>Window.crypto</code></strong>속성은 전역 객체인 {{domxref("Crypto")}} 객체를 반환합니다. <code>Crypto</code> 객체는 웹 페이지가 특정 암호학적 서비스에 접근할 수 있는 경로입니다.</span> <code>crypto</code> 속성 자체는 읽기 전용이지만, 모든 메서드(와 자식 객체 {{domxref("SubtleCrypto")}})의 메서드)는 읽기 전용이 아니므로 {{glossary("polyfill", "폴리필")}}을 통한 공격에 취약합니다.</p>
+
+<h2 id="구문">구문</h2>
+
+<pre class="syntaxbox">var <em>cryptoObj</em> = window.crypto || window.msCrypto; // for IE 11
+</pre>
+
+<h2 id="예제">예제</h2>
+
+<p id="Using_the_domxrefWindow.crypto_property_to_access_the_getRandomValues_method.">다음 예제는 {{domxref("Window.crypto")}} 속성을 통해 {{domxref("Crypto.getRandomValues", "getRandomValues()")}} 메서드에 접근합니다.</p>
+
+<h3 id="JavaScript">JavaScript</h3>
+
+<pre class="brush: js">genRandomNumbers = function getRandomNumbers() {
+ var array = new Uint32Array(10);
+ window.crypto.getRandomValues(array);
+
+ var randText = document.getElementById("myRandText");
+ randText.innerHTML = "The random numbers are: "
+ for (var i = 0; i &lt; array.length; i++) {
+ randText.innerHTML += array[i] + " ";
+ }
+}</pre>
+
+<h3 id="HTML">HTML</h3>
+
+<pre class="brush: html">&lt;p id="myRandText"&gt;The random numbers are: &lt;/p&gt;
+&lt;button type="button" onClick='genRandomNumbers()'&gt;Generate 10 random numbers&lt;/button&gt;</pre>
+
+<h3 id="결과">결과</h3>
+
+<p>{{EmbedLiveSample('예제')}}</p>
+
+<h2 id="명세">명세</h2>
+
+<table class="standard-table">
+ <tbody>
+ <tr>
+ <th scope="col">명세</th>
+ <th scope="col">상태</th>
+ <th scope="col">비고</th>
+ </tr>
+ <tr>
+ <td>{{SpecName("Web Crypto API", "#dfn-GlobalCrypto", "Window.crypto")}}</td>
+ <td>{{Spec2("Web Crypto API")}}</td>
+ <td>Initial definition</td>
+ </tr>
+ </tbody>
+</table>
+
+<h2 id="브라우저_호환성">브라우저 호환성</h2>
+
+
+
+<p>{{Compat("api.Window.crypto")}}</p>
+
+<h2 id="같이_보기">같이 보기</h2>
+
+<ul>
+ <li>{{domxref("Window")}} 전역 객체</li>
+ <li>{{domxref("Crypto")}} 인터페이스</li>
+</ul>