指定 CNG 雜湊演算法 的登錄值 hashalgorithm (onenote\security\crypto)使用者HKCU\software\policies\microsoft\office\16.0\onenote\security\crypto

原則 ID
L_SpecifyCNGHashAlgorithm
適用範圍
使用者設定
支援的作業系統
至少需要 Windows Server 2008 R2 或 Windows 7
來源
Microsoft 365 Apps / Office Administrative Templates (版本 5568.1000)
類別
Microsoft OneNote 2016 › OneNote 選項 › 安全性 › 密碼編譯

登錄

hashalgorithm

REG_SZ使用者
啟用時的值
取決於選項值
元素
-
選項
項目儲存的值
SHA1SHA1
SHA256SHA256
SHA384SHA384
SHA512SHA512
以 .reg · CMD · PowerShell 套用
.reg
Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\software\policies\microsoft\office\16.0\onenote\security\crypto]

; 選項 (只使用其中一個)
; SHA1
"hashalgorithm"="SHA1"
; SHA256
"hashalgorithm"="SHA256"
; SHA384
"hashalgorithm"="SHA384"
; SHA512
"hashalgorithm"="SHA512"
CMD
:: 選項 (只使用其中一個)

:: SHA1
reg add "HKCU\software\policies\microsoft\office\16.0\onenote\security\crypto" /v "hashalgorithm" /t REG_SZ /d "SHA1" /f
:: SHA256
reg add "HKCU\software\policies\microsoft\office\16.0\onenote\security\crypto" /v "hashalgorithm" /t REG_SZ /d "SHA256" /f
:: SHA384
reg add "HKCU\software\policies\microsoft\office\16.0\onenote\security\crypto" /v "hashalgorithm" /t REG_SZ /d "SHA384" /f
:: SHA512
reg add "HKCU\software\policies\microsoft\office\16.0\onenote\security\crypto" /v "hashalgorithm" /t REG_SZ /d "SHA512" /f
PowerShell
# 共通: 建立機碼
New-Item -Path 'HKCU:\software\policies\microsoft\office\16.0\onenote\security\crypto' -Force | Out-Null

# 選項 (只使用其中一個)
# SHA1
New-ItemProperty -Path 'HKCU:\software\policies\microsoft\office\16.0\onenote\security\crypto' -Name 'hashalgorithm' -PropertyType String -Value 'SHA1' -Force | Out-Null
# SHA256
New-ItemProperty -Path 'HKCU:\software\policies\microsoft\office\16.0\onenote\security\crypto' -Name 'hashalgorithm' -PropertyType String -Value 'SHA256' -Force | Out-Null
# SHA384
New-ItemProperty -Path 'HKCU:\software\policies\microsoft\office\16.0\onenote\security\crypto' -Name 'hashalgorithm' -PropertyType String -Value 'SHA384' -Force | Out-Null
# SHA512
New-ItemProperty -Path 'HKCU:\software\policies\microsoft\office\16.0\onenote\security\crypto' -Name 'hashalgorithm' -PropertyType String -Value 'SHA512' -Force | Out-Null