mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-06 15:48:51 +00:00
Fix indentation
This commit is contained in:
@@ -11,16 +11,16 @@ _rand_bytes :: proc(dst: []byte) {
|
|||||||
ret := (os.Errno)(win32.BCryptGenRandom(nil, raw_data(dst), u32(len(dst)), win32.BCRYPT_USE_SYSTEM_PREFERRED_RNG))
|
ret := (os.Errno)(win32.BCryptGenRandom(nil, raw_data(dst), u32(len(dst)), win32.BCRYPT_USE_SYSTEM_PREFERRED_RNG))
|
||||||
if ret != os.ERROR_NONE {
|
if ret != os.ERROR_NONE {
|
||||||
switch ret {
|
switch ret {
|
||||||
case os.ERROR_INVALID_HANDLE:
|
case os.ERROR_INVALID_HANDLE:
|
||||||
// The handle to the first parameter is invalid.
|
// The handle to the first parameter is invalid.
|
||||||
// This should not happen here, since we explicitly pass nil to it
|
// This should not happen here, since we explicitly pass nil to it
|
||||||
panic("crypto: BCryptGenRandom Invalid handle for hAlgorithm")
|
panic("crypto: BCryptGenRandom Invalid handle for hAlgorithm")
|
||||||
case os.ERROR_INVALID_PARAMETER:
|
case os.ERROR_INVALID_PARAMETER:
|
||||||
// One of the parameters was invalid
|
// One of the parameters was invalid
|
||||||
panic("crypto: BCryptGenRandom Invalid parameter")
|
panic("crypto: BCryptGenRandom Invalid parameter")
|
||||||
case:
|
case:
|
||||||
// Unknown error
|
// Unknown error
|
||||||
fmt.panicf("crypto: BCryptGenRandom failed: %d\n", ret)
|
fmt.panicf("crypto: BCryptGenRandom failed: %d\n", ret)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user